/* Reset podstawowy */
:root {
    --primary: #2c3e50;       /* Ciemny granat */
    --primary-dark: #1a252f;
    --accent: #d35400;        /* Stonowany akcent */
    --accent-hover: #b84900;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --white: #ffffff;
    --text-main: #1f2937;
    --text: #1f2937;          /* Alias dla kompatybilności */
    --text-light: #6b7280;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --header-bg: rgba(255, 255, 255, 0.95);
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* overflow-x: hidden; */
    font-size: 15px;
}

/* Zapobieganie rozpychaniu strony przez duże zdjęcia */
img {
    max-width: 100%;
    height: auto;
}

/* Tryb Ciemny */
body.dark-mode {
    --primary: #f8fafc;
    --primary-dark: #f1f5f9;
    --accent: #d35400; /* W trybie ciemnym akcent może zostać lub być jaśniejszy */
    --accent-hover: #e67e22;
    --bg-body: #0f172a;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --white: #1e293b; /* Dla elementów używających white jako tła */
    --text-main: #f1f5f9;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --text-muted: #94a3b8;
    --border: #334155;
    --header-bg: rgba(15, 23, 42, 0.95);
    --input-bg: #1e293b;
    --input-border: #475569;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

body.dark-mode .main-header {
    background-color: var(--header-bg);
    border-bottom-color: var(--border);
}

body.dark-mode .logo { color: var(--primary-dark); }
body.dark-mode .main-header nav a { color: var(--text-main); }
body.dark-mode .main-header nav a:hover { color: var(--accent); }

body.dark-mode .btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border);
}
body.dark-mode .btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--accent);
    color: var(--accent);
}

body.dark-mode input, 
body.dark-mode select, 
body.dark-mode textarea {
    background-color: var(--input-bg);
    color: var(--text-main);
    border-color: var(--input-border);
}

body.dark-mode .feature-box { background-color: var(--bg-card); }
body.dark-mode .feature-box:hover { background-color: var(--bg-body); }
body.dark-mode .why-us-section { background-color: var(--bg-body); border-top-color: var(--border); }
body.dark-mode .login-container { background-color: var(--bg-card); }
body.dark-mode .add-property-form { background-color: var(--bg-card); }
body.dark-mode .details-specs li { background-color: rgba(0, 0, 0, 0.2); }
body.dark-mode .details-specs li:hover { background-color: rgba(0, 0, 0, 0.3); }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    /* overflow-x: hidden; */
}

/* Klasy pomocnicze */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: none;
    width: 85%;
}

@media (max-width: 768px) {
    .container-wide { width: 100%; }
    .container { padding: 0 15px; }
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Nagłówek */
.main-header {
    background-color: var(--header-bg);
    /* backdrop-filter: blur(10px); */
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    z-index: 10001;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    border-bottom: none;
    flex-shrink: 0; /* Zapobiega kurczeniu się logo w układzie flex */
}

.main-nav {
    min-width: 0; /* Pozwala nawigacji na kurczenie się, zapobiegając przepełnieniu kontenera */
}

.main-header .nav-links {
    display: flex;
    gap: 30px;
}

.main-header .nav-links a:hover {
    color: var(--accent);
    transition: color 0.2s;
}

/* Przycisk zmiany motywu */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px 10px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.theme-toggle-btn i {
    transition: transform 0.3s ease-in-out;
}

.theme-toggle-btn:hover { color: var(--accent); }

/* Favorites Icon */
.favorites-btn { position: relative; color: var(--text-main); font-size: 1.2rem; transition: color 0.2s; display: flex; align-items: center; text-decoration: none; }
.favorites-btn:hover { color: var(--accent); }
.favorites-count { position: absolute; top: -8px; right: -8px; background: var(--accent); color: white; font-size: 0.7rem; font-weight: 700; padding: 2px 5px; border-radius: 10px; min-width: 16px; text-align: center; display: none; }

/* Sekcja Hero */
.hero-section {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1600596542815-2495db98dada?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}
/* Poprawka dla Hero na mobilu */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; margin-bottom: 15px; }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-secondary-hero {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid var(--white);
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.btn-secondary-hero:hover {
    background-color: var(--white);
    color: var(--primary-dark);
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-transform: none;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Nowy układ strony głównej z sidebarem */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding-top: 60px;
    padding-bottom: 60px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.search-widget {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.search-widget h3 {
    margin-bottom: 20px;
    color: var(--primary-dark);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.search-form-vertical .form-group {
    margin-bottom: 15px;
}

.search-form-vertical label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.search-form-vertical input,
.search-form-vertical select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--input-bg);
}

.price-range {
    display: flex;
    gap: 10px;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

/* Sekcja Ofert */
/* .offers-section usunięte/zmienione na .offers-content wewnątrz gridu */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    font-weight: 800;
}

.offers-grid {
    display: grid;
    /* Automatyczne dopasowanie kolumn: min 300px szerokości */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Lista ofert (zamiast siatki) */
.offers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.offers-list .offer-card {
    flex-direction: row;
    min-height: 220px;
}

.offers-list .card-image {
    width: 400px;
    height: auto;
    flex-shrink: 0;
}

.offers-list .card-content {
    justify-content: center;
    align-items: flex-start;
}

.offers-list .details {
    border-top: none;
    padding-top: 0;
    margin-bottom: 15px;
}

.offers-list .btn-secondary {
    margin-top: 0;
    display: inline-block;
}

@media (max-width: 768px) {
    .offers-list .offer-card {
        flex-direction: column;
    }
    .offers-list .card-image {
        width: 100%;
        height: 250px;
    }
    /* Ulepszenie kart na mobilu */
    .offer-card-modern {
        flex-direction: column;
        border-radius: 12px;
    }
    .card-img-wrapper {
        width: 100%;
        height: 220px;
    }
}

/* Karta Oferty */
.offer-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(30px);
}

.offer-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.offer-card.visible:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-image {
    height: 250px;
    position: relative;
    background-color: #f1f5f9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.badge {
    background: rgba(255, 255, 255, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.badge.type-sale { color: var(--accent); }
.badge.type-rent { color: #059669; }

.badge.prop-type-house { color: #ea580c; }      /* Pomarańczowy */
.badge.prop-type-land { color: #16a34a; }       /* Zielony */
.badge.prop-type-commercial { color: #7c3aed; } /* Fioletowy - Lokal */
.badge.prop-type-apartment { color: #0891b2; }  /* Turkusowy */
.badge.prop-type-object { color: #db2777; }     /* Różowy - Obiekt */



.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.price {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.location {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.price-per-m2 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 10px;
}

.offer-symbol {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: block;
}

.details {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.btn-secondary {
    display: block;
    text-align: center;
    background-color: var(--white);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-top: auto;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: var(--accent);
    color: var(--accent);
}

/* Stopka */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
}



/* --- Style dla Panelu Logowania i Admina --- */

.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

@media (max-width: 480px) {
    .login-container {
        margin: 40px auto;
        padding: 20px;
        width: 90%;
    }
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.login-container .form-check {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 15px 0;
    text-align: left;
}
.login-container .form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    min-height: auto; /* Reset min-height for checkbox */
}
.login-container .form-check label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

.admin-panel {
    padding: 40px 20px;
}

.add-property-form {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    margin-bottom: 50px;
    display: block;
    position: relative;
}

.form-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.add-property-form input, .form-grid-wrapper input {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.add-property-form input[list]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    transition: 0.2s;
    cursor: pointer;
}
.add-property-form input[list]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.add-property-form select {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.add-property-form button {
    grid-column: span 2;
    justify-self: start;
}

.form-section-header {
    grid-column: span 2;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 700;
}
/* Pływający pasek akcji w formularzu */
.form-actions-floating {
    position: -webkit-sticky;
    position: sticky;
    bottom: 20px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 15px 25px;
    margin: 30px auto 0;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.15);
    display: flex;
    gap: 15px;
    align-items: center;
}
.form-actions-floating button, .form-actions-floating a { 
    flex: 1; 
    margin: 0; 
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
}
.form-actions-floating button:hover, .form-actions-floating a:hover {
    transform: translateY(-2px);
}
body.dark-mode .form-actions-floating {
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.5);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    border-radius: 8px;
    overflow: hidden;
}
/* Kontener dla tabeli admina na mobilu - przewijanie */
.table-container {
    overflow-x: auto;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

body.dark-mode .admin-table {
    background-color: var(--bg-card);
    color: var(--text-main);
}
body.dark-mode .admin-table th {
    background-color: var(--bg-body);
    color: var(--primary-dark);
    border-bottom-color: var(--border);
}
body.dark-mode .admin-table td {
    border-bottom-color: var(--border);
}

.actions-cell {
    display: flex;
    gap: 10px;
}

.btn-delete {
    color: #e74c3c;
    font-weight: bold;
    text-decoration: none;
}

.btn-edit {
    color: #2563eb;
    font-weight: bold;
    text-decoration: none;
}

.error {
    color: #e74c3c;
    background: #fadbd8;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}
/* Szczegóły ogłoszenia */
.offer-details {
    max-width: 1280px;
    width: 90%;
    margin: 0 auto;
}
.details-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.details-header h1 { font-size: 2.2rem; color: var(--primary-dark); line-height: 1.2; margin-bottom: 10px; }
.details-header p { color: var(--text-muted); font-size: 1.1rem; }


.details-specs {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.details-specs h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.details-specs ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (max-width: 576px) {
    .details-specs ul {
        grid-template-columns: 1fr; /* Jedna kolumna specyfikacji na telefonie */
    }
}

.details-specs li {
    background-color: var(--bg-body);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.2s;
}

.details-specs li:hover {
    background-color: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.details-specs li span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.details-specs li strong {
    font-size: 1.05rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.details-description {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    line-height: 1.8;
    border: 1px solid var(--border);
    font-size: 1.05rem;
    color: var(--text-main);
}
.details-description h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    text-align: center;
}

.details-map {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.details-map h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 10px 0;
    text-align: center;
}
.map-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}
.map-address svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Nowy układ dwukolumnowy */
.details-content-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 dla galerii, 1/3 dla paska bocznego */
    gap: 40px;
    align-items: flex-start; /* Ważne dla sticky */
}

.details-layout {
    /* Ten kontener jest teraz tylko dla galerii */
    gap: 40px;
}

.details-layout-full {
    /* Klasa dla sekcji, które mają iść na całą szerokość */
    width: 100%;
}

.full-width-section {
    grid-column: 1 / -1; /* Rozciąga sekcję na obie kolumny */
}

/* Galeria w nowym układzie */
.details-gallery .main-image img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid var(--border);
}

.thumbnail-item img:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

/* Pasek boczny */
.details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.key-info-box {
    background: var(--bg-card);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.key-info-box .price {
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 25px;
}

.key-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.key-details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}
.key-details li span {
    color: var(--text-muted);
}
.key-details li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.contact-form-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}
.contact-form-section h3 { margin-bottom: 15px; color: var(--primary-dark); font-weight: 700; }
.contact-form-section input, .contact-form-section textarea { 
    width: 100%; 
    padding: 12px 15px; 
    margin-bottom: 15px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    background-color: #f8fafc;
    transition: all 0.2s;
}
.contact-form-section input:focus, .contact-form-section textarea:focus {
    background-color: #fff;
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.contact-form-section button { width: 100%; }

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.agent-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.agent-details h3 { font-size: 1.1rem; margin: 0; color: var(--primary-dark); }
.agent-details p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* Galeria istniejących zdjęć w panelu admina */
.existing-images-grid {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.existing-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.existing-image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.btn-delete-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(239, 68, 68, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-delete-img:hover {
    background-color: rgba(220, 38, 38, 1);
}



.btn-edit-offer {
    display: block;
    width: 100%;
    margin-top: 30px;
    background-color: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.btn-edit-offer:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Galeria */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.gallery-item.full-width img {
    height: 400px;
}

/* Autouzupełnianie adresu */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-card);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none; /* Domyślnie ukryte */
}

.suggestions-list li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.suggestions-list li:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

/* Spinner dla wyszukiwania adresu */
.search-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none; /* Domyślnie ukryty */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Przycisk AI */
.btn-ai {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
}

.btn-ai:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
}

.btn-ai:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsywność dla strony szczegółów */
@media (max-width: 992px) {
    .details-layout {
        grid-template-columns: 1fr; /* Zmiana na jedną kolumnę na mniejszych ekranach */
    }
    .details-specs ul {
        /* Na mniejszych ekranach lepiej wygląda jedna kolumna */
        grid-template-columns: 1fr;
    }
}

/* Style dla nowych sekcji */
.details-section-main {
    padding-bottom: 60px;
}

.details-section-specs {
    background-color: #f1f5f9; /* Lekko ciemniejsze tło dla oddzielenia */
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.details-main-content {
    /* Kontener na lewą kolumnę z treścią */
}

.details-section-location {
    padding: 60px 0;
}

/* Social Media Buttons */
.social-share { display: flex; gap: 10px; margin-top: 20px; }
.social-btn { 
    width: 40px; height: 40px; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    color: white; text-decoration: none; 
    transition: transform 0.2s, box-shadow 0.2s; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.social-btn:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); color: white; }
.btn-fb { background: #1877f2; } .btn-tw { background: #1da1f2; } .btn-li { background: #0a66c2; } .btn-wa { background: #25d366; }

/* Kalkulator Kredytowy */
.credit-calculator-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.credit-calculator-box h4 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.calc-field {
    margin-bottom: 15px;
}

.calc-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.calc-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.calc-results {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.calc-results div {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.calc-results strong {
    display: block;
    font-size: 1.2rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-top: 5px;
}
#monthlyRate {
    color: var(--accent);
    font-size: 1.5rem;
}

@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Sekcja Dlaczego My */
.why-us-section {
    padding: 80px 0;
    background-color: var(--white);
    border-top: 1px solid var(--border);
}

.section-header-center {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header-center h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 800;
}

.section-header-center p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-box {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, background-color 0.3s, border-color 0.3s;
    background-color: var(--bg-body);
    border: 1px solid transparent;
    opacity: 0;
    transform: translateY(30px);
}

.feature-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-box.visible:hover {
    transform: translateY(-5px);
    background-color: var(--white);
    box-shadow: var(--shadow-card);
    border-color: var(--border);
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #eff6ff;
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
}

/* Sekcja CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e293b 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.cta-section p {
    margin-bottom: 35px;
    opacity: 0.9;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-dark);
    padding: 14px 35px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Responsywność --- */

@media (max-width: 1100px) {
    .main-nav {
        position: fixed;
        top: 70px; /* Wysokość nagłówka - menu wysuwa się pod nim */
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        padding: 20px;
        background: var(--bg-card);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s, opacity 0.3s linear;
        visibility: hidden; /* Całkowite ukrycie elementu gdy jest zamknięty */
        opacity: 0; /* Dodatkowe ukrycie wizualne */
        pointer-events: none; /* Blokada kliknięć gdy zamknięte */
        z-index: 999; /* Zwiększony Z-index dla pewności */
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        border-top: 1px solid var(--border);
        box-shadow: none;
    }

    .main-nav[data-visible="true"] {
        transform: translateX(0%);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s, opacity 0.3s linear; /* Natychmiastowa widoczność przy otwieraniu */
    }

    .main-header .nav-links {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 0;
        width: 100%;
    }

    .main-header .nav-links li {
        width: 100%;
        border-bottom: none;
        opacity: 1; /* Wymuszenie widoczności elementów */
        transform: none;
    }
    
    .main-nav[data-visible="true"] .nav-links li {
        opacity: 1;
        transform: none;
    }

    .main-header .nav-links a,
    .main-header .nav-links button {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background-color: var(--bg-body);
        border-radius: 12px;
        border: 1px solid var(--border);
        width: 100%;
        text-align: left;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        transition: all 0.2s;
    }
    
    .main-header .nav-links a::after {
        content: '\f054'; /* fa-chevron-right */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 0.8rem;
        color: var(--text-light);
        opacity: 0.5;
    }

    .main-header .nav-links a:hover,
    .main-header .nav-links button:hover {
        background-color: var(--bg-body);
        border-color: var(--accent);
        color: var(--accent);
        transform: translateX(5px);
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border-radius: 8px;
        background: transparent;
        border: 1px solid transparent;
        color: var(--text);
        font-size: 1.4rem;
        z-index: 10001;
    }
    
    .mobile-nav-toggle:active {
        background: var(--bg-body);
    }
    
    /* Poprawki dla wyszukiwarki na mobilu (zachowane) */
    .search-container {
        margin-top: -50px;
        padding: 20px 15px;
    }
    .search-form-grid {
        grid-template-columns: 1fr; /* Pola jedno pod drugim */
        gap: 12px;
    }
    .btn-search-modern {
        width: 100%; /* Przycisk na całą szerokość */
        margin-top: 10px;
    }
}

/* Dodatkowe style dla bardzo małych ekranów (telefony) */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    /* Karty ofert */
    .card-body-modern {
        padding: 15px;
    }
    .card-title-modern {
        font-size: 1.1rem;
    }
    .card-price-modern {
        font-size: 1.3rem;
    }
    .card-sub-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 15px;
    }
    .card-specs-modern {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85rem;
    }
    .btn-details-modern {
        width: 100%;
        text-align: center;
        padding: 12px;
        margin-top: 15px;
    }
    
    /* Szczegóły oferty */
    .details-header h1 { font-size: 1.6rem; }
    .key-info-box .price { text-align: left; font-size: 1.8rem; }
}


/* --- Responsywność Panelu Admina --- */
@media (max-width: 1100px) {
    .admin-page .admin-layout {
        flex-direction: column;
    }
    
    /* Admin Sidebar / Tabs Mobile - Styl Tabletek */
    .admin-page .admin-sidebar {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        position: sticky;
        top: 70px; /* Poniżej nagłówka */
        z-index: 99;
        margin-bottom: 20px;
        background: var(--bg-card);
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
        border-bottom: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }

    .admin-page .admin-menu {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding: 10px 20px;
        scrollbar-width: none; /* Firefox */
    }
    
    .admin-page .admin-menu::-webkit-scrollbar { display: none; }

    .admin-page .admin-menu li a {
        border: 1px solid var(--border);
        border-radius: 50px; /* Kształt pastylki */
        padding: 8px 16px;
        font-size: 0.9rem;
        background: var(--bg-body);
        white-space: nowrap;
        margin: 0;
        box-shadow: none;
        justify-content: center;
        border-bottom: 1px solid var(--border); /* Reset border */
        border-right: 1px solid var(--border); /* Reset border */
    }
    
    .admin-page .admin-menu li a.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 2px 5px rgba(44, 62, 80, 0.3);
    }
    
    .admin-page .admin-menu li a i { margin-right: 8px; }
}

/* Poprawki dla urządzeń mobilnych (tablety i telefony) */
@media (max-width: 768px) {
    .admin-page .admin-panel {
        padding: 20px 15px; /* Mniejszy padding na zewnątrz */
    }
    .admin-page .form-container, 
    .admin-page .table-container {
        padding: 20px; /* Mniejszy padding wewnątrz kart */
    }

    /* --- Poprawki dla formularza --- */
    .admin-page .add-property-form {
        /* display block is fine */
    }
    .form-grid-wrapper {
        grid-template-columns: 1fr;
    }
    
    /* Wymuszenie jednej kolumny na elementach z inline style */
    .admin-page .add-property-form input[style*="grid-column"],
    .admin-page .add-property-form select[style*="grid-column"],
    .admin-page .add-property-form textarea[style*="grid-column"],
    .admin-page .add-property-form div[style*="grid-column"] {
        grid-column: span 1 !important;
        width: 100% !important;
    }
    
    /* Wymuszenie jednej kolumny na wewnętrznych siatkach */
    .admin-page .add-property-form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Responsywność małych grup pól (np. winda + ilość, cena + checkbox) */
    .admin-page .add-property-form div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .admin-page .add-property-form div[style*="display: flex"] > label {
        margin-top: 8px;
    }
    
    /* Wyjątek dla wyszukiwarki adresu (zachowaj w jednej linii z spinnerem) */
    .admin-page .add-property-form div[style*="display: flex"][style*="position: relative"] {
        flex-direction: row !important;
    }

    /* --- Poprawki dla tabel --- */
    .admin-page .table-container {
        overflow-x: auto; /* Zapewnia przewijanie w poziomie */
    }
    .admin-page .admin-table {
        min-width: 800px; /* Wymusza minimalną szerokość, aby aktywować przewijanie */
    }
    .admin-page .admin-table tbody td, 
    .admin-page .admin-table thead th {
        padding: 12px 10px; /* Mniejszy padding w komórkach */
        font-size: 0.9rem;
        white-space: nowrap; /* Zapobiega niechcianemu zawijaniu w komórkach */
    }
    
    /* Zezwolenie na łamanie tekstu w ważnych komórkach */
    .admin-page .admin-table td:nth-child(2) {
        white-space: normal;
        min-width: 250px; /* Daj więcej miejsca na tytuł */
    }
    .admin-page .admin-table td:nth-child(2) div[style*="font-weight: 600"] {
        word-break: break-word;
    }

    /* --- Specjalne poprawki dla Pulpitu (Dashboard) --- */
    /* Tabela na pulpicie ma się mieścić bez przewijania */
    .admin-page .admin-table.dashboard-table {
        min-width: 100% !important;
        table-layout: fixed; /* Pozwala na łamanie tekstu */
    }
    .admin-page .admin-table.dashboard-table th,
    .admin-page .admin-table.dashboard-table td {
        white-space: normal !important; /* Łamanie tekstu */
        padding: 10px 8px; /* Mniejszy padding */
        font-size: 0.85rem;
    }
    
    /* Zmniejszenie kafelków statystyk na mobilu */
    .stat-card {
        padding: 15px;
        gap: 15px;
    }
    .stat-icon { width: 50px; height: 50px; font-size: 1.2rem; }
    .stat-info p { font-size: 1.5rem; }
    
    /* Responsywność kart logów */
    .log-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .log-property-thumb {
        margin-top: 10px;
        width: 100%;
        height: 120px;
    }

    /* --- Poprawki dla formularza dodawania użytkownika --- */
    .admin-page .add-user-form {
        display: flex !important; /* Nadpisz inline style */
        flex-direction: column !important;
        gap: 15px !important;
        align-items: stretch !important;
    }
    .admin-page .add-user-form .form-group {
        flex: none !important; /* Usuń flex-grow */
        width: 100%;
    }
    .admin-page .add-user-form button.btn-primary { width: 100% !important; height: auto !important; padding: 12px !important; }

    /* --- NOWY STYL TABEL NA MOBILU (WIDOK KART) --- */
    .admin-page .admin-table thead { display: none; }
    
    .admin-page .admin-table, 
    .admin-page .admin-table tbody, 
    .admin-page .admin-table tr, 
    .admin-page .admin-table td {
        display: block; 
        width: 100%; 
        min-width: 0 !important; /* Reset min-width */
    }
    
    .admin-page .admin-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--bg-card);
        padding: 0;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .admin-page .admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid var(--border);
    }
    
    .admin-page .admin-table td:last-child { border-bottom: none; }
    
    .admin-page .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.85rem;
        text-align: left;
        margin-right: 15px;
        flex-shrink: 0;
    }
    
    /* Wyjątek dla zdjęcia - na pełną szerokość u góry karty */
    .admin-page .admin-table td.mobile-image-cell {
        padding: 0;
        justify-content: center;
        text-align: center;
        background: var(--bg-body);
        margin: 0;
        width: 100%;
        border-bottom: 1px solid var(--border);
        height: 150px; /* Fixed height for image area */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .admin-page .admin-table td.mobile-image-cell img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }
    .admin-page .admin-table td.mobile-image-cell::before { display: none; }
    
    /* --- POPRAWKA CZYTELNOŚCI DLA KOLUMNY OFERTA --- */
    /* Tytuł i adres na pełną szerokość, wyrównane do lewej */
    .admin-page .properties-table td[data-label="Oferta"] {
        display: block;
        text-align: left;
        height: auto;
        padding: 15px;
    }
    .admin-page .properties-table td[data-label="Oferta"]::before {
        display: none; /* Ukryj etykietę "Oferta" - tytuł jest oczywisty */
    }
    .admin-page .properties-table td[data-label="Oferta"] > div {
        text-align: left;
        width: 100%;
    }
    
    /* Wyjątek dla akcji - wyśrodkowane na dole */
    .admin-page .admin-table td.actions-cell {
        justify-content: flex-end;
        gap: 10px;
        background: var(--bg-body);
    }
    .admin-page .admin-table td.actions-cell::before { display: none; }
    
    /* Wyrównanie treści wewnątrz komórek */
    .admin-page .admin-table td > div { text-align: right; }
}

/* --- Nowoczesne Karty Ofert (Port z index.php) --- */

.offers-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px 0;
}

.offer-card-modern {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.offer-card-modern:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); border-color: var(--accent); }

.card-img-wrapper {
    position: relative;
    width: 300px;
    flex-shrink: 0;
    height: auto;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.offer-card-modern:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-badges-modern {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge-modern {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-sale { background: #10b981; }
.badge-rent { background: #3b82f6; }
.badge-type { background: rgba(31, 41, 55, 0.85); backdrop-filter: blur(4px); }

.card-body-modern {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-title-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
    padding-right: 15px;
}

.card-price-modern {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    white-space: nowrap;
}

.card-sub-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.card-address-modern {
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-per-meter {
    font-weight: 500;
}

.card-specs-modern {
    display: flex;
    gap: 20px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.spec-item i {
    color: var(--primary);
}

.btn-details-modern {
    margin-top: 20px;
    display: inline-block;
    width: auto;
    align-self: flex-start;
    text-align: center;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.2s;
}

.btn-details-modern:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Animacja pulsowania dla rezerwacji */
@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
.badge-pulse {
    animation: pulse-orange 2s infinite;
}

/* Responsywność kart */
@media (max-width: 992px) {
    .offer-card-modern {
        flex-direction: column;
    }
    .card-img-wrapper {
        width: 100%;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .offer-card-modern {
        box-shadow: none;
        border: 1px solid var(--border);
    }
    .card-body-modern { padding: 15px; }
    .btn-details-modern { width: 100%; text-align: center; padding: 12px; margin-top: 15px; }
    .card-title-modern { font-size: 1.15rem; }
    .card-price-modern { font-size: 1.3rem; }

    .card-sub-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .card-address-modern {
        flex-wrap: wrap;
    }
}
/* Dodatkowe poprawki dla bardzo małych ekranów (telefony) */
@media (max-width: 480px) {
    .admin-page .stats-grid {
        grid-template-columns: 1fr; /* Statystyki jedna pod drugą */
    }
}

@media (max-width: 576px) {
    .main-nav {
        /* Fix for mobile: ensure it behaves like the tablet drawer */
        bottom: auto;
        height: auto;
        width: 100%;
    }
}
        /* --- NOWE STYLE MODERNIZACJA --- */
        
        /* Sekcja Statystyk */
        .stats-section {
            padding: 60px 0;
            background: var(--primary-dark);
            color: white;
            text-align: center;
            margin-top: 60px;
        }
        .stats-grid-public {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 40px;
            max-width: 1000px;
            margin: 0 auto;
        }
        .stat-item-public i {
            font-size: 2.5rem;
            color: var(--accent);
            margin-bottom: 15px;
        }
        .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            display: block;
            margin-bottom: 5px;
        }
        .stat-label {
            font-size: 1.1rem;
            opacity: 0.8;
            font-weight: 300;
        }

        /* Ulepszona Galeria w Szczegółach */
        .details-gallery-modern {
            position: relative;
            margin-bottom: 40px;
        }
        .main-image-modern {
            height: 500px;
            width: 100%;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            position: relative;
        }
        .main-image-modern img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        .main-image-modern:hover img { transform: scale(1.03); }
        
        @media (max-width: 768px) {
            .main-image-modern { height: 300px; }
            .stats-grid-public { gap: 30px; }
            .stat-number { font-size: 2rem; }
        }
        

        /* --- NOWE SEKCJE ROZBUDOWY --- */

        /* Popularne Lokalizacje */
        .locations-section { padding: 40px 0 60px; }
        .locations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 30px; }
        .location-card { position: relative; height: 280px; border-radius: 16px; overflow: hidden; cursor: pointer; display: block; text-decoration: none; }
        .location-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
        .location-card:hover img { transform: scale(1.1); }
        .location-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; transition: background 0.3s; }
        .location-card:hover .location-overlay { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); }
        .location-name { color: white; font-size: 1.5rem; font-weight: 700; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
        .location-count { color: rgba(255,255,255,0.9); font-size: 0.95rem; font-weight: 500; display: flex; align-items: center; gap: 5px; }
        .location-arrow { position: absolute; right: 20px; bottom: 20px; color: white; opacity: 0; transform: translateX(-10px); transition: all 0.3s; font-size: 1.2rem; }
        .location-card:hover .location-arrow { opacity: 1; transform: translateX(0); }

        /* Nasze Usługi */
        .services-section { padding: 80px 0; background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
        .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
        .service-card { background: var(--bg-body); padding: 40px 30px; border-radius: 16px; text-align: center; transition: all 0.3s; border: 1px solid var(--border); position: relative; overflow: hidden; }
        .service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--accent); background: var(--bg-card); }
        .service-icon { width: 80px; height: 80px; background: rgba(211, 84, 0, 0.1); color: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 25px; transition: 0.3s; }
        .service-card:hover .service-icon { background: var(--accent); color: white; transform: rotateY(180deg); }
        .service-card h3 { margin-bottom: 15px; color: var(--primary); font-size: 1.3rem; }
        .service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

        /* Nasi Agenci */
        .team-section { padding: 80px 0; background: var(--bg-body); }
        .team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; margin-top: 40px; }
        .agent-card-home { text-align: center; background: var(--bg-card); padding: 35px 25px; border-radius: 20px; border: 1px solid var(--border); transition: 0.3s; position: relative; }
        .agent-card-home:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: var(--primary); }
        .agent-photo-wrapper { position: relative; width: 140px; height: 140px; margin: 0 auto 20px; }
        .agent-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-body); box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: 0.3s; }
        .agent-card-home:hover .agent-photo { border-color: var(--accent); }
        .agent-name { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
        .agent-role { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
        .agent-contact-home { display: flex; justify-content: center; gap: 12px; }
        .agent-btn-home { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-body); display: flex; align-items: center; justify-content: center; color: var(--text-light); transition: 0.2s; border: 1px solid var(--border); text-decoration: none; }
        .agent-btn-home:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-3px); }

        /* Opinie Klientów */
        .testimonials-section { padding: 80px 0; background: linear-gradient(135deg, var(--primary-dark) 0%, #0f172a 100%); color: white; position: relative; overflow: hidden; }
        .testimonials-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
    .testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; position: relative; z-index: 1; margin-top: 40px; }
        .testimonial-card { background: rgba(255,255,255,0.05); padding: 40px; border-radius: 20px; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
        .testimonial-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-5px); }
        .quote-icon { font-size: 2rem; color: var(--accent); margin-bottom: 20px; opacity: 0.8; }
        .testimonial-text { font-style: italic; margin-bottom: 25px; opacity: 0.9; font-size: 1.1rem; line-height: 1.6; }
        .testimonial-author { display: flex; align-items: center; gap: 15px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
        .author-avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #e67e22); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
        .author-info h4 { margin: 0; font-size: 1.05rem; font-weight: 600; }
        .author-info span { font-size: 0.85rem; opacity: 0.6; }

        /* --- NOWE SEKCJE ROZBUDOWY V2 --- */

        /* Sekcja Premium */
        .premium-section { padding: 60px 0; background: #f8fafc; border-bottom: 1px solid var(--border); }
        body.dark-mode .premium-section { background: var(--bg-body); }
        .premium-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 30px; }
        .premium-card { background: var(--card-bg); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); border: 1px solid var(--border); transition: 0.3s; position: relative; display: block; text-decoration: none; color: inherit; }
        .premium-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: var(--accent); }
        .premium-badge { position: absolute; top: 15px; left: 15px; background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%); color: #fff; padding: 5px 12px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; z-index: 2; box-shadow: 0 2px 10px rgba(0,0,0,0.2); text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }
        .premium-img-wrapper { height: 250px; width: 100%; overflow: hidden; position: relative; }
        .premium-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
        .premium-card:hover .premium-img { transform: scale(1.1); }
        .premium-body { padding: 25px; }
        .premium-price { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
        .premium-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; color: var(--text); }
        .premium-loc { color: var(--text-light); font-size: 0.9rem; margin-bottom: 20px; display: flex; align-items: center; gap: 5px; }
        .premium-specs { display: flex; gap: 15px; border-top: 1px solid var(--border); padding-top: 15px; color: var(--text-light); font-size: 0.9rem; }

        /* Newsletter */
        .newsletter-section { padding: 80px 0; background: var(--primary); color: white; text-align: center; position: relative; overflow: hidden; }
        .newsletter-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.1; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; }
        .newsletter-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
        .newsletter-form { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
        .newsletter-input { flex: 1; padding: 15px 25px; border-radius: 50px; border: none; font-size: 1rem; outline: none; min-width: 200px; }
        .newsletter-btn { background: var(--accent); color: white; border: none; padding: 15px 35px; border-radius: 50px; font-weight: 700; cursor: pointer; transition: 0.3s; white-space: nowrap; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        .newsletter-btn:hover { background: #e67e22; transform: scale(1.05); }

        /* Details Sub-nav (Sticky) */
        .details-sub-nav { 
            position: -webkit-sticky; position: sticky; 
            top: 85px; 
            z-index: 90; 
            margin-bottom: 30px; 
            transition: top 0.3s;
            display: flex;
            justify-content: center;
            pointer-events: none; /* Klikanie obok paska */
            padding: 0 15px;
        }
        
        .sub-nav-list { 
            display: inline-flex; 
            gap: 5px; 
            overflow-x: auto; 
            padding: 6px; 
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
            pointer-events: auto;
            max-width: 100%;
            scrollbar-width: none; 
        }
        .sub-nav-list::-webkit-scrollbar { display: none; }
        
        .sub-nav-link { 
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 20px; 
            color: var(--text-light); 
            font-weight: 600; 
            border-radius: 8px;
            cursor: pointer; 
            white-space: nowrap; 
            transition: all 0.2s; 
            font-size: 0.9rem; 
            text-decoration: none; 
            border: 1px solid transparent;
        }
        
        .sub-nav-link:hover { 
            background-color: var(--bg-body);
            color: var(--text);
        }
        
        .sub-nav-link.active { 
            background-color: var(--accent); 
            color: white; 
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        
        /* Side Nav Slider for Desktop */
        @media (min-width: 1200px) {
            .details-sub-nav {
                position: fixed;
                top: 50%;
                left: 20px;
                transform: translateY(-50%);
                width: auto;
                height: auto;
                margin: 0;
                padding: 0;
                z-index: 900;
                justify-content: flex-start;
                pointer-events: none; /* Kontener nie blokuje kliknięć pod spodem */
            }
            .sub-nav-list {
                flex-direction: column;
                display: flex;
                padding: 15px;
                gap: 10px;
                background: var(--bg-card);
                border: 1px solid var(--border);
                border-radius: 16px;
                box-shadow: 0 10px 30px rgba(0,0,0,0.1);
                pointer-events: auto; /* Elementy listy są klikalne */
            }
            .sub-nav-link {
                padding: 12px 20px;
                border-radius: 10px;
                width: 100%;
            }
        }

        /* Tools Box (Print/QR) */
        .tools-box { display: flex; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
        .tool-btn { flex: 1; padding: 8px; background: transparent; border: 1px solid var(--border); border-radius: 8px; text-align: center; font-size: 0.85rem; cursor: pointer; color: var(--text-light); transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 5px; text-decoration: none; }
        .tool-btn:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }

        /* Print Styles */
        @media print {
            .main-header, .details-sub-nav, footer, .contact-form-section, .similar-offers, .mobile-sticky-contact, .tools-box, .btn-edit-offer, .btn-live-edit, .user-actions, .social-share, .newsletter-section { display: none !important; }
            .details-sidebar-column { display: none; } /* Ukryj sidebar przy druku dla uproszczenia */
            .details-gallery-column { width: 100%; }
            body { background: white; color: black; }
            .offer-details { padding: 0; margin: 0; max-width: 100%; }
            .details-header h1 { font-size: 24pt; color: black; }
            .details-description, .details-specs, .details-map { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
            a[href]:after { content: none !important; }
        }
        /* --- ULEPSZENIA UX SZCZEGÓŁÓW --- */

        /* Highlights Bar (Pasek Cech) */
        .highlights-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 30px;
            padding: 20px;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        }
        .highlight-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding-right: 25px;
            border-right: 1px solid var(--border);
        }
        .highlight-item:last-child { border-right: none; padding-right: 0; }
        .highlight-icon {
            width: 42px;
            height: 42px;
            background: rgba(211, 84, 0, 0.1);
            color: var(--accent);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }
        .highlight-text { display: flex; flex-direction: column; line-height: 1.2; }
        .highlight-label { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
        .highlight-value { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

        @media (max-width: 768px) {
            .highlights-bar { gap: 15px; padding: 15px; }
            .highlight-item { border-right: none; width: 45%; margin-bottom: 5px; padding-right: 0; }
        }

        /* Visual Distances (Kafelki Odległości) */
        .distances-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; margin-top: 20px; }
        .distance-card { background: var(--bg-body); padding: 15px; border-radius: 12px; text-align: center; border: 1px solid var(--border); transition: transform 0.2s; }
        .distance-card:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--card-bg); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
        .distance-icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 8px; }
        .distance-val { font-weight: 800; font-size: 1.1rem; color: var(--primary); display: block; }
        .distance-label { font-size: 0.8rem; color: var(--text-light); font-weight: 500; }

        /* Quick Questions (Chipy w formularzu) */
        .quick-questions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
        .question-chip { background: var(--bg-body); border: 1px solid var(--border); padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; color: var(--text-light); font-weight: 500; }
        .question-chip:hover { background: var(--accent); color: white; border-color: var(--accent); transform: translateY(-1px); }

        /* Actions in Highlights Bar */
        .highlight-actions {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
            margin-left: auto;
        }
        .action-btn-small {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--bg-body);
            color: var(--text-light);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            font-size: 1rem;
        }
        .action-btn-small:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        .action-btn-small.active {
            color: #ef4444;
            border-color: #ef4444;
            background: #fee2e2;
        }
        .action-btn-small.active:hover {
            background: #ef4444;
            color: white;
        }

        /* Heartbeat Animation */
        @keyframes heartbeat {
            0% { transform: scale(1); }
            14% { transform: scale(1.3); }
            28% { transform: scale(1); }
            42% { transform: scale(1.3); }
            70% { transform: scale(1); }
        }
        .action-btn-small.active i {
            animation: heartbeat 1.3s ease-in-out;
        }
        
        @media (max-width: 992px) {
            .highlight-actions {
                width: 100%;
                justify-content: flex-start;
                margin-top: 15px;
                margin-left: 0;
                padding-top: 15px;
                border-top: 1px solid var(--border);
            }
        }

              /* Symbol oferty w nagłówku */
        .details-header-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 20px;
            margin-bottom: 10px;
        }
        .details-header-top h1 {
            margin-bottom: 0;
        }
        .header-badges {
            display: flex;
            gap: 15px;
            align-items: flex-start;
        }
        .offer-badge {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-top: 3px solid var(--accent);
            padding: 8px 15px;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            text-align: center;
            min-width: 120px;
            flex-shrink: 0;
            position: relative;
        }
        .offer-badge.price-badge {
            border-top-color: #10b981; /* Zielony akcent dla ceny */
            min-width: auto;
            padding: 8px 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 25px;
        }
        .offer-badge span {
            display: block;
            font-size: 0.7rem;
            color: var(--text-light);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 3px;
            font-weight: 600;
        }
        .offer-badge strong {
            display: block;
            font-size: 1.3rem;
            color: var(--primary);
            font-weight: 800;
        }
        
        .price-content {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        @media (max-width: 768px) {
            .details-header-top {
                flex-direction: column;
            }
            .header-badges {
                width: 100%;
                flex-wrap: wrap;
            }
            .offer-badge {
                align-self: flex-start;
                text-align: left;
                width: auto;
                min-width: 0;
                flex: 1;
                border-top: 1px solid var(--border);
                border-left: 3px solid var(--accent);
                display: flex;
                flex-direction: column;
                gap: 10px;
                align-items: center;
                padding: 5px 15px;
                justify-content: center;
            }
            .offer-badge.price-badge { border-left-color: #10b981; }
            .offer-badge span { margin-bottom: 0; }
        }
         /* Location Badge */
        .details-location-badge {
            display: inline-flex;
            align-items: center;
            gap: 15px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            padding: 12px 25px;
            border-radius: 12px;
            margin-bottom: 25px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.02);
            color: var(--text);
            font-size: 1.05rem;
            font-weight: 500;
            flex-wrap: wrap;
        }
        .location-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .location-item i {
            color: var(--accent);
            font-size: 1.1rem;
        }
        .location-separator {
            width: 1px;
            height: 20px;
            background: var(--border);
        }

        @media (max-width: 768px) {
            .details-location-badge {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                width: 100%;
                border-radius: 12px;
                padding: 15px;
            }
            .location-separator {
                display: none;
            }
            .details-header h1 {
                font-size: 1.8rem; /* Dopasowanie wielkości tytułu na mobilu */
            }
        }

        /* Unified Header Styles */
        .details-header-unified {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 30px;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 30px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            margin-bottom: 30px;
        }

        .dh-left {
            flex: 1;
        }

.dh-title-row {
            display: flex;
            align-items: center;
    gap: 15px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .details-header h1 {
            margin: 0;
            font-size: 2rem;
            font-weight: 800;
            color: var(--primary);
            line-height: 1.2;
        }

        .dh-symbol {
            font-size: 0.75rem;
            color: var(--accent);
            background: rgba(211, 84, 0, 0.05);
            padding: 6px 12px;
            border-radius: 20px;
            border: 1px solid rgba(211, 84, 0, 0.15);
            font-weight: 700;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .dh-location {
            display: flex;
            align-items: center;
    gap: 10px;
            margin-top: 8px;
            flex-wrap: wrap;
        }
.dh-location span { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    background: var(--bg-body);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}
.dh-location span:hover { border-color: var(--accent); background: var(--bg-card); }
.dh-location i { color: var(--accent); font-size: 1rem; }

        .dh-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 10px;
            min-width: 220px;
        }

.dh-price-container { text-align: right; }
        .dh-price { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
        .dh-price-m2 { font-size: 1rem; color: var(--text-light); margin-top: 5px; }

        .dh-badge {
            padding: 8px 16px;
            border-radius: 8px;
            color: white;
            font-weight: 700;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            display: inline-block;
        }
        .dh-badge.negotiable { background-color: var(--accent); }

        /* --- ULEPSZONA RESPONSYWNOŚĆ (MOBILE) --- */

        @media (max-width: 768px) {
            /* Ogólne */
            .container { padding: 0 15px; }
            
            /* Poprawka dla body, aby uniknąć poziomego przewijania */
            body {
                overflow-x: hidden;
            }
            
            /* Poprawa przycisków i elementów interaktywnych */
            button, .btn, .btn-primary, .btn-secondary, .btn-white, .btn-search-modern, input[type="submit"], input[type="button"], select, input {
                min-height: 48px; /* Większy obszar dotyku */
                font-size: 16px; /* Zapobieganie zoomowaniu na iOS */
            }

            /* Nagłówek */
            .main-header .container { height: 60px; }
            .logo { font-size: 1.3rem; }
            
            /* Hero */
            .hero-modern { padding: 40px 15px 60px; }
            .hero-modern h1 { font-size: 1.8rem; margin-bottom: 10px; }
            .hero-modern p { font-size: 1rem; }
            
            /* Wyszukiwarka */
            .search-container { 
                margin-top: 0; 
                border-radius: 0; 
                box-shadow: none; 
                border-left: none; 
                border-right: none; 
                background: var(--bg-card);
                padding: 20px;
            }
            
            /* Sticky Sub-nav na mobilu */
            .details-sub-nav {
                top: 60px;
                background: rgba(255, 255, 255, 0.95);
                backdrop-filter: blur(10px);
                border-bottom: 1px solid var(--border);
                margin: 0 -15px 20px -15px; /* Full width relative to container padding */
                padding: 10px 15px;
                width: calc(100% + 30px);
                display: block;
                overflow-x: auto;
            }
            .sub-nav-list {
                display: inline-flex;
                width: auto;
                border: none;
                padding: 0;
                background: transparent;
                box-shadow: none;
                gap: 10px;
            }
            .sub-nav-link {
                background: var(--bg-card);
                border: 1px solid var(--border);
                border-radius: 50px;
                padding: 8px 16px;
                font-size: 0.85rem;
                box-shadow: 0 2px 4px rgba(0,0,0,0.05);
                flex-shrink: 0;
            }
            .sub-nav-link.active {
                background: var(--accent);
                color: white;
                border-color: var(--accent);
            }

            /* Szczegóły - Nagłówek Zunifikowany */
            .details-header-unified { 
                flex-direction: column; 
                padding: 20px; 
                gap: 15px; 
            }
            .dh-left, .dh-right { 
                width: 100%; 
                align-items: flex-start; 
            }
            .details-header h1 { 
                font-size: 1.6rem; 
                line-height: 1.3;
            }
            .dh-right { 
                flex-direction: column; 
                gap: 15px; 
                border-top: 1px solid var(--border); 
                padding-top: 15px; 
                margin-top: 5px; 
                align-items: flex-start;
            }
            .dh-price-container { 
                text-align: left; 
                display: flex; 
                align-items: baseline; 
                gap: 10px; 
                flex-wrap: wrap; 
            }
            .dh-price { font-size: 1.8rem; }
            
            /* Szczegóły - Pasek Cech (Grid) */
            .highlights-bar { 
                display: grid; 
                grid-template-columns: 1fr 1fr; 
                gap: 15px; 
                padding: 15px; 
            }
            .highlight-item { 
                width: auto; 
                border-right: none; 
                padding-right: 0; 
                margin-bottom: 0; 
            }
            .highlight-actions { 
                grid-column: 1 / -1; 
                justify-content: space-between; 
                width: 100%; 
                border-top: 1px solid var(--border); 
                padding-top: 15px; 
                margin-top: 5px; 
                margin-left: 0; 
            }
            
            /* Galeria */
            .main-image-modern { height: 250px; }
            
            /* Admin Panel - Formularze */
            .admin-panel { padding: 20px 15px; }
            .form-container, .table-container { padding: 20px 15px; }
            
            /* Pływający przycisk na mobile */
            .form-actions-floating {
                width: calc(100% - 30px); /* Margines po bokach */
                bottom: 15px;
                padding: 12px 15px;
            }
            
            /* Filtry wykresów na mobilu */
            .chart-filters {
                overflow-x: auto;
                white-space: nowrap;
                max-width: 100%;
                padding-bottom: 10px;
                justify-content: flex-start;
            }
            .chart-filters a {
                flex-shrink: 0;
                padding: 8px 16px;
                background: var(--bg-body);
                border: 1px solid var(--border);
            }
            .chart-filters a.active {
                background: var(--primary);
                color: white;
                border-color: var(--primary);
            }

            /* --- KOMPLEKSOWA NAPRAWA FORMULARZA NA MOBILE --- */
            
            /* Główny kontener formularza jako kolumna */
            .admin-page .add-property-form .form-grid-wrapper {
                display: flex !important;
                flex-direction: column !important;
                gap: 20px !important;
            }
            
            /* Wszystkie elementy wewnątrz na pełną szerokość */
            .admin-page .add-property-form .form-grid-wrapper > * {
                width: 100% !important;
                max-width: 100% !important;
                margin-left: 0 !important;
                margin-right: 0 !important;
                grid-column: auto !important; /* Ignoruj ustawienia grida */
            }
            
            /* Zmiana wewnętrznych gridów na flex column */
            .admin-page .add-property-form div[style*="display: grid"] {
                display: flex !important;
                flex-direction: column !important;
                gap: 15px !important;
                grid-template-columns: none !important;
            }
            
            /* Zmiana wewnętrznych flexów na flex column (dla grup inputów) */
            .admin-page .add-property-form div[style*="display: flex"] {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 15px !important;
                height: auto !important; /* Reset wysokości */
            }
            
            /* Wyjątki - elementy, które MAJĄ być w poziomie */
            .admin-page .add-property-form .form-switch-item {
                flex-direction: row !important;
                justify-content: space-between !important;
                align-items: center !important;
                padding: 12px 15px !important;
            }
            
            /* Poprawa inputów wewnątrz grup */
            .admin-page .add-property-form input,
            .admin-page .add-property-form select,
            .admin-page .add-property-form textarea {
                width: 100% !important;
                flex: none !important;
            }
            
            /* Custom distances row */
            .custom-distance-row { flex-direction: column !important; background: var(--bg-body); padding: 10px; border-radius: 8px; border: 1px solid var(--border); }
            .custom-distance-row > div:first-child { width: 100% !important; justify-content: center !important; margin-bottom: 10px; }
            
            /* Mapa */
            #map-detail { height: 300px !important; }
            
            /* Tabela w widoku kart - poprawka wyrównania */
            .admin-page .admin-table td {
                /* Style przeniesione do sekcji @media (max-width: 768px) wyżej */
            }
            
        }

/* --- Styl dla pola hasła z ikonką oka --- */
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100% !important;
    padding-right: 45px !important; /* Miejsce na ikonkę */
}
.password-toggle-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color 0.2s;
}
.password-toggle-btn:hover { color: var(--primary); }
        