/* ===========================
   JG Nieruchomości — Main CSS
   Design System
   =========================== */

/* --- Variables --- */
:root {
    --green: #1B3A2D;
    --green-light: #244D3A;
    --green-dark: #142B21;
    --gold: #C5A55A;
    --gold-light: #D4BA7A;
    --gold-dark: #A8893E;
    --white: #FAFAF8;
    --bg: #F5F4F0;
    --text: #2C2C2C;
    --text-light: #6B6B6B;
    --border: #E2E0DB;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(27,58,45,0.12);
    --transition: 0.3s ease;
    --max-width: 1200px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'Lato', sans-serif; color: var(--text); background: var(--white); line-height: 1.7; font-weight: 300; }
h1, h2, h3, h4, h5 { font-family: 'Playfair Display', serif; font-weight: 600; line-height: 1.3; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2rem; color: var(--green); margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-light); font-size: 1.05rem; margin-bottom: 50px; }
.gold-line { width: 60px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }

/* --- Buttons --- */
.jg-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px; border: none; border-radius: var(--radius);
    font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: all var(--transition); text-decoration: none;
    letter-spacing: 0.02em; line-height: 1;
}
.jg-btn-gold { background: var(--gold); color: var(--green-dark); }
.jg-btn-gold:hover { background: var(--gold-light); color: var(--green-dark); transform: translateY(-1px); }
.jg-btn-green { background: var(--green); color: #fff; }
.jg-btn-green:hover { background: var(--green-light); color: #fff; }
.jg-btn-outline { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.jg-btn-outline:hover { background: var(--gold); color: var(--green-dark); }
.jg-btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* --- Header --- */
.site-header {
    background: var(--green); padding: 0; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 72px;
}
.site-logo { display: flex; align-items: center; gap: 14px; }
.site-logo img { height: 48px; width: auto; }
.site-logo-text { font-family: 'Playfair Display', serif; color: var(--gold); font-size: 1.2rem; font-weight: 600; letter-spacing: 0.03em; }

/* Nav */
.site-nav { display: flex; align-items: center; gap: 8px; list-style: none; }
.site-nav li { list-style: none; display: flex; }
.site-nav a {
    color: rgba(255,255,255,0.85); padding: 8px 16px; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 400; transition: all var(--transition);
}
.site-nav a:hover, .site-nav a.current, .site-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,0.1); }

.header-cta { display: flex; align-items: center; gap: 16px; }
.header-phone { color: var(--gold-light) !important; font-weight: 400; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.header-phone:hover { color: #fff !important; }

/* Mobile menu toggle */
.menu-toggle {
    display: none; background: none; border: none; color: var(--gold);
    cursor: pointer; padding: 8px;
}
.menu-toggle svg { width: 28px; height: 28px; }

/* --- Hero --- */
.hero { background: var(--green); position: relative; overflow: visible; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding-top: 80px; padding-bottom: 100px; }
.hero-text h1 { color: #fff; font-size: 2.6rem; margin-bottom: 8px; }
.hero-text .license { color: var(--gold); font-family: 'Lato', sans-serif; font-size: 1rem; font-weight: 400; margin-bottom: 24px; display: block; }
.hero-text p { color: rgba(255,255,255,0.85); font-size: 1.15rem; line-height: 1.8; margin-bottom: 32px; }
.hero-photo { display: flex; justify-content: center; }
.hero-photo img { width: 100%; max-width: 380px; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.3); object-fit: cover; aspect-ratio: 3/4; }

/* --- Hero Search --- */
.hero-search {
    background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
    padding: 28px; margin-top: 40px; overflow: visible;
}
.hero-search-row { display: flex; gap: 12px; flex-wrap: wrap; overflow: visible; }
.hero-search-row .jg-select, .hero-search-row .jg-location-autocomplete { flex: 1; min-width: 140px; }
.hero-search-row input {
    flex: 1; min-width: 140px; padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius);
    background: rgba(255,255,255,0.1); color: #fff;
    font-size: 0.9rem;
}
.hero-search-row input::placeholder { color: rgba(255,255,255,0.5); }
.hero-search .jg-btn { width: 100%; margin-top: 12px; justify-content: center; padding: 14px; }

/* Hero Search — listing-like variant on homepage */
.hero-search--listing {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 40px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.hero-search--listing .filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    overflow: visible;
}
.hero-search--listing .filter-group {
    flex: 1;
    min-width: 140px;
    position: relative;
    overflow: visible;
}
.hero-search--listing .filter-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-search--listing .filter-group input::placeholder { color: var(--text-light); }
.hero-search--listing .filter-group input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}
.hero-search--listing .jg-btn {
    width: auto;
    margin-top: 0;
    justify-content: center;
    padding: 9px 18px;
}
.hero-search--listing .hero-search-submit {
    flex-shrink: 0;
    align-self: flex-end;
}

/* Ensure homepage listing-variant does not keep hero-dark field skin */
.hero-search--listing .jg-select-hero .jg-select-trigger {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}
.hero-search--listing .jg-select-hero .jg-select-trigger:hover { border-color: var(--gold-light); }
.hero-search--listing .jg-select-hero.open .jg-select-trigger {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}
.hero-search--listing .jg-select-hero .jg-select-label.placeholder { color: var(--text-light); }
.hero-search--listing .jg-select-hero .jg-select-arrow { color: var(--text-light); }
.hero-search--listing .jg-select-hero .jg-select-dropdown {
    background: #fff;
    border-color: var(--border);
}

.hero-search--listing .jg-location-hero input[type="text"] {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}
.hero-search--listing .jg-location-hero input[type="text"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}
.hero-search--listing .jg-location-hero input[type="text"]::placeholder { color: var(--text-light); }
.hero-search--listing .jg-location-hero .jg-location-selected {
    background: rgba(197, 165, 90, 0.08);
    border-color: var(--gold);
}
.hero-search--listing .jg-location-hero .jg-location-selected-name { color: var(--green); }
.hero-search--listing .jg-location-hero .jg-location-selected-context { color: var(--text-light); }
.hero-search--listing .jg-location-hero .jg-location-clear { color: var(--text-light); }
.hero-search--listing .jg-location-hero .jg-location-clear:hover { color: var(--text); }
.hero-search--listing .jg-location-hero .jg-location-radius-select {
    color: var(--gold-dark);
    border-color: var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A8893E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.hero-search--listing .jg-location-hero .jg-location-radius-select:hover {
    background-color: rgba(197, 165, 90, 0.12);
    border-color: var(--gold-dark);
}

/* --- Offer Cards --- */
.offers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.offer-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); transition: transform var(--transition), box-shadow var(--transition);
}
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.offer-card-link { display: block; color: inherit; text-decoration: none; }
.offer-card-link:hover { color: inherit; }
.offer-card-image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg); }
.offer-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.offer-card:hover .offer-card-image img { transform: scale(1.05); }
.offer-card-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--gold); color: var(--green-dark); padding: 4px 12px;
    border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.offer-card-body { padding: 20px; }
.offer-card-price { font-family: 'Playfair Display', serif; font-size: 1.35rem; color: var(--green); font-weight: 700; margin-bottom: 4px; }
.offer-card-price-m2 { font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px; }
.offer-card-title { font-family: 'Lato', sans-serif; font-size: 0.95rem; font-weight: 400; color: var(--text); margin-bottom: 12px; line-height: 1.4; }
.offer-card-params { display: flex; gap: 16px; font-size: 0.85rem; color: var(--text-light); }
.offer-card-params span { display: flex; align-items: center; gap: 4px; }
.offer-card-params svg { width: 16px; height: 16px; stroke: var(--gold-dark); fill: none; stroke-width: 1.5; }
.offer-card-location { margin-top: 12px; font-size: 0.82rem; color: var(--text-light); display: flex; align-items: center; gap: 4px; }
.offer-card-location svg { width: 14px; height: 14px; stroke: var(--gold-dark); fill: none; stroke-width: 1.5; }

/* --- Offer List View --- */
.offer-row { display: flex; gap: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; transition: box-shadow var(--transition); }
.offer-row:hover { box-shadow: var(--shadow); }
.offer-row-image { width: 280px; min-height: 200px; flex-shrink: 0; overflow: hidden; }
.offer-row-image img { width: 100%; height: 100%; object-fit: cover; }
.offer-row-body { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* --- Filters --- */
.filters-bar {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 32px; overflow: visible;
}
.filters-row { display: grid; gap: 14px; overflow: visible; }
.filters-main-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
    align-items: end;
}
.filters-range-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
}
.filter-group { min-width: 0; position: relative; overflow: visible; }
.filter-group label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-light); margin-bottom: 6px; letter-spacing: 0.05em; }
.filter-group .jg-select { width: 100%; }
.filter-group input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.9rem; color: var(--text);
    background: #fff; transition: border-color var(--transition);
}
.filter-group input:focus { border-color: var(--gold); outline: none; }
.filters-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.filters-actions .jg-btn { flex-shrink: 0; }
.filters-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.offers-count { font-size: 0.95rem; color: var(--text-light); }
.view-toggle { display: flex; gap: 4px; }
.view-toggle button { background: none; border: 1px solid var(--border); padding: 8px 10px; border-radius: 4px; cursor: pointer; color: var(--text-light); }
.view-toggle button.active { background: var(--green); color: #fff; border-color: var(--green); }
.sort-select { padding: 8px 14px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.85rem; }

@media (max-width: 1200px) {
    .filters-main-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters-range-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 40px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.9rem; color: var(--text); transition: all var(--transition); }
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }

/* --- Single Offer --- */
.single-offer { padding: 40px 0 80px; }
.single-offer-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; }
.offer-gallery { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.offer-gallery-main { position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); touch-action: pan-y; }
.jg-carousel-track { display: flex; width: 100%; height: 100%; will-change: transform; transform: translate3d(0,0,0); }
.jg-carousel-track.is-animating { transition: transform 280ms cubic-bezier(0.22,0.61,0.36,1); }
.jg-carousel-slide { flex: 0 0 100%; width: 100%; height: 100%; overflow: hidden; }
.jg-carousel-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.offer-gallery-main .jg-carousel-slide img { cursor: pointer; touch-action: pan-y; }
.offer-gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.offer-gallery-thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition); }
.offer-gallery-thumbs img:hover, .offer-gallery-thumbs img.active { border-color: var(--gold); }

.offer-params-table { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.offer-params-table tr { border-bottom: 1px solid var(--border); }
.offer-params-table th { text-align: left; padding: 12px 16px; font-weight: 700; font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; width: 40%; background: var(--bg); }
.offer-params-table td { padding: 12px 16px; font-size: 0.95rem; }

.offer-description { margin-bottom: 32px; line-height: 1.8; }
.offer-description h2 { font-size: 1.4rem; color: var(--green); margin-bottom: 16px; }

.offer-map { height: 350px; border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }

/* Sidebar */
.offer-sidebar { position: sticky; top: 92px; }
.offer-price-box {
    background: var(--green); color: #fff; border-radius: var(--radius);
    padding: 28px; margin-bottom: 24px;
}
.offer-price-box .price { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; }
.offer-price-box .price-m2 { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

.offer-agent-box {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 24px; text-align: center;
}
.offer-agent-box img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; }
.offer-agent-box h3 { font-size: 1.1rem; color: var(--green); margin-bottom: 4px; }
.offer-agent-box .agent-role { font-size: 0.85rem; color: var(--text-light); margin-bottom: 16px; }
.offer-agent-box a { display: block; margin-bottom: 8px; }

/* --- Contact Form --- */
.jg-contact-form { max-width: 100%; }
.jg-form-group { margin-bottom: 16px; }
.jg-form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.jg-form-group .required { color: #d63638; }
.jg-form-group input, .jg-form-group textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; transition: border-color var(--transition);
}
.jg-form-group input:focus, .jg-form-group textarea:focus { border-color: var(--gold); outline: none; }
.jg-contact-form .jg-btn { width: 100%; justify-content: center; }
.jg-form-status { margin-top: 12px; padding: 12px; border-radius: var(--radius); font-size: 0.9rem; display: none; }
.jg-form-status.success { display: block; background: #ecfdf5; color: #065f46; }
.jg-form-status.error { display: block; background: #fef2f2; color: #991b1b; }
.jg-recaptcha-notice { font-size: 0.75rem; color: var(--text-light); margin-top: 12px; }

/* --- Breadcrumbs --- */
.breadcrumbs { padding: 16px 0; font-size: 0.85rem; color: var(--text-light); }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--gold-dark); }
.breadcrumbs .separator { margin: 0 8px; }

/* --- Services Section --- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 36px 24px; text-align: center; transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    background: var(--green); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-size: 1.15rem; color: var(--green); margin-bottom: 10px; }
.service-card p { font-size: 0.92rem; color: var(--text-light); line-height: 1.6; }

/* --- About Section --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-text h2 { font-size: 1.8rem; color: var(--green); margin-bottom: 20px; }
.about-text p { margin-bottom: 16px; font-size: 1.05rem; }

/* --- CTA Section --- */
.cta-section { background: var(--green); padding: 60px 0; text-align: center; }
.cta-section h2 { color: #fff; font-size: 2rem; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 28px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Contact Page --- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
.contact-item {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px 20px; text-align: center;
}
.contact-icon {
    width: 52px; height: 52px; margin: 0 auto 16px;
    background: rgba(27,58,45,0.08); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.8; }
.contact-item h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-dark); margin-bottom: 8px; font-family: 'Lato', sans-serif; font-weight: 700; }
.contact-item a { color: var(--green); font-size: 1.1rem; }
.contact-item p { color: var(--text); font-size: 1rem; }

/* --- Footer --- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,0.6); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--gold); font-size: 1rem; margin-bottom: 16px; font-family: 'Lato', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.9rem; display: block; margin-bottom: 8px; }
.footer-col a:hover { color: var(--gold-light); }
/* Contact column: avoid doubled spacing from block links + <br> */
.site-footer .footer-col p a[href^="tel:"],
.site-footer .footer-col p a[href^="mailto:"] {
    display: inline;
    margin-bottom: 0;
}
.site-footer .footer-col p a[href^="mailto:"] + br + br { display: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 0.82rem; }
.footer-bottom p { margin-bottom: 4px; }
.footer-building-note { color: var(--gold); font-weight: 400; }

/* --- 404 --- */
.page-404 { text-align: center; padding: 100px 24px; }
.page-404 h1 { font-size: 6rem; color: var(--green); margin-bottom: 16px; }
.page-404 p { font-size: 1.2rem; color: var(--text-light); margin-bottom: 32px; }

/* --- Lightbox --- */
.jg-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999; display: none; align-items: center; justify-content: center; }
.jg-lightbox.active { display: flex; }
.jg-lightbox-viewport { width: min(92vw, 1200px); height: min(90vh, 820px); overflow: hidden; touch-action: pan-y; }
.jg-lightbox .jg-carousel-slide img { object-fit: contain; touch-action: pan-y; }
.jg-lightbox-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; }
.jg-lightbox-prev, .jg-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    background: rgba(0,0,0,0.4);
    border: none;
    padding: 0;
    border-radius: 50%;
}
.jg-lightbox-prev { left: 20px; }
.jg-lightbox-next { right: 20px; }

/* --- Loading spinner --- */
.jg-loading { text-align: center; padding: 40px; }
.jg-spinner { display: inline-block; width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: jg-spin 0.8s linear infinite; }
@keyframes jg-spin { to { transform: rotate(360deg); } }

/* --- Custom Select --- */
.jg-select {
    position: relative;
    width: 100%;
}
.jg-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    text-align: left;
    line-height: 1.4;
    min-height: 42px;
}
.jg-select-trigger:hover { border-color: var(--gold-light); }
.jg-select.open .jg-select-trigger {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}
.jg-select-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-select-label.placeholder { color: var(--text-light); }
.jg-select-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    color: var(--text-light);
    transition: transform var(--transition);
    display: flex;
}
.jg-select.open .jg-select-arrow { transform: rotate(180deg); }

.jg-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    max-height: 0;
    overflow: hidden;
}
.jg-select.open .jg-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 320px;
    overflow-y: auto;
}
.jg-select-search {
    display: block;
    width: calc(100% - 16px);
    margin: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    background: var(--bg);
}
.jg-select-search:focus { border-color: var(--gold); }
.jg-select-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.jg-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    transition: background 0.15s ease;
}
.jg-select-option:hover { background: var(--bg); }
.jg-select-option.selected {
    background: rgba(27, 58, 45, 0.06);
    color: var(--green);
    font-weight: 700;
}
.jg-select-option.selected::after {
    content: '';
    width: 16px; height: 16px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%231B3A2D' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
    margin-left: 8px;
}
.jg-select-option-count {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: auto;
    padding-left: 8px;
}
.jg-select-option.selected .jg-select-option-count { color: var(--green-light); }
.jg-select-option.disabled { opacity: 0.4; cursor: default; }
.jg-select-option.disabled:hover { background: transparent; }

/* Custom select — Hero variant */
.jg-select-hero .jg-select-trigger {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    min-width: 140px;
}
.jg-select-hero .jg-select-trigger:hover { border-color: rgba(255,255,255,0.4); }
.jg-select-hero.open .jg-select-trigger {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.2);
}
.jg-select-hero .jg-select-label.placeholder { color: rgba(255,255,255,0.5); }
.jg-select-hero .jg-select-arrow { color: rgba(255,255,255,0.5); }
.jg-select-hero .jg-select-dropdown {
    background: #fff;
    border-color: var(--border);
}

/* Custom select — Sort variant */
.sort-select-wrapper .jg-select-trigger {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 4px;
    min-height: 36px;
}

/* --- Map Search View --- */
#offers-map-container { display: none; }
#offers-map-container.active { display: block; }
#offers-map {
    width: 100%;
    height: 500px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    z-index: 1;
}
.map-search-hint {
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid var(--border);
    border-top: none;
    margin-bottom: 16px;
}
.map-search-hint svg { vertical-align: middle; margin-right: 4px; }

/* Map search controls panel */
.map-search-controls {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 12px;
    margin-bottom: 16px;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.map-search-controls.visible { display: flex; }

.map-search-controls label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.radius-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 180px;
}
.radius-slider-wrap input[type="range"] {
    flex: 1;
    accent-color: var(--gold);
    height: 6px;
    cursor: pointer;
}
.radius-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--green);
    min-width: 50px;
    text-align: center;
}
#map-results-count {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 4px;
}

/* Map marker styles */
.jg-map-marker { background: none !important; border: none !important; }
.jg-map-center-marker { background: none !important; border: none !important; }
.jg-marker-outside { filter: grayscale(0.7); }

/* Map popup */
.jg-map-popup-wrapper .leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.jg-map-popup-wrapper .leaflet-popup-content { margin: 0; width: 240px !important; }
.jg-map-popup img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.jg-map-popup-body { padding: 12px 14px; }
.jg-map-popup-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
}
.jg-map-popup-title {
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 6px;
}
.jg-map-popup-area {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
}
.jg-map-popup-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold-dark);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 1px;
}
.jg-map-popup-link:hover { color: var(--green); }

/* --- Dropdown Overlay (mobile bottom sheets) --- */
.jg-dropdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    -webkit-tap-highlight-color: transparent;
}
body.jg-dropdown-open { overflow: hidden; position: fixed; width: 100%; }

/* Mobile bottom sheet header */
.jg-select-mobile-header {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px 4px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}
.jg-select-mobile-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 8px;
}
.jg-select-mobile-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 0 8px;
}

/* --- Location Autocomplete --- */
.jg-location-autocomplete {
    position: relative;
    width: 100%;
}
.jg-location-autocomplete input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition);
}
.jg-location-autocomplete input[type="text"]:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}
.jg-location-autocomplete input[type="text"]::placeholder { color: var(--text-light); }

.jg-location-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.jg-location-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jg-location-section-label {
    padding: 8px 16px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}
.jg-location-recent { border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.jg-location-popular { padding-bottom: 4px; }

.jg-location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.jg-location-item:hover, .jg-location-item.active { background: var(--bg); }
.jg-location-item-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.jg-location-item-name { font-size: 0.9rem; color: var(--text); font-weight: 400; }
.jg-location-item-context { font-size: 0.78rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jg-location-item-count {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-light);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 12px;
}
.jg-location-empty { padding: 16px; text-align: center; font-size: 0.85rem; color: var(--text-light); }

/* Mobile search input inside location dropdown — hidden on desktop */
.jg-location-mobile-search { display: none; }

/* Selected location chip */
.jg-location-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    background: rgba(197, 165, 90, 0.08);
    min-height: 42px;
    max-width: 100%;
    overflow: hidden;
}
.jg-location-selected-name { font-size: 0.9rem; color: var(--green); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jg-location-selected-context { font-size: 0.78rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jg-location-clear {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--transition);
}
.jg-location-clear:hover { color: var(--text); }

/* Location radius select (embedded in chip) */
.jg-location-radius-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: var(--gold-dark);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 2px 20px 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-left: auto;
    margin-right: 4px;
    line-height: 1.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A8893E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px 5px;
    min-width: 50px;
    transition: all var(--transition);
}
.jg-location-radius-select:hover {
    background-color: rgba(197, 165, 90, 0.12);
    border-color: var(--gold-dark);
}
.jg-location-radius-select:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

/* Hero variant */
.jg-location-hero input[type="text"] {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    min-width: 140px;
}
.jg-location-hero input[type="text"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.2);
}
.jg-location-hero input[type="text"]::placeholder { color: rgba(255,255,255,0.5); }
.jg-location-hero .jg-location-selected {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}
.jg-location-hero .jg-location-selected-name { color: #fff; }
.jg-location-hero .jg-location-selected-context { color: rgba(255,255,255,0.6); }
.jg-location-hero .jg-location-clear { color: rgba(255,255,255,0.5); }
.jg-location-hero .jg-location-clear:hover { color: #fff; }
.jg-location-hero .jg-location-radius-select {
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.3);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.7)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.jg-location-hero .jg-location-radius-select:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Mobile price box (below title, hidden on desktop) */
.offer-price-mobile { display: none; margin-bottom: 24px; border-radius: var(--radius); }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .offers-grid { grid-template-columns: repeat(2, 1fr); }
    .single-offer-grid { grid-template-columns: 1fr; }
    .offer-sidebar { position: static; }
    .offer-price-mobile { display: block; }
    .offer-sidebar .offer-price-box { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; padding-top: 60px; padding-bottom: 80px; gap: 40px; }
    .hero-photo { order: -1; }
    .hero-photo img { max-width: 280px; }
    .hero-search-row { flex-direction: column; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .contact-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }

    /* Mobile nav */
    .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--green); flex-direction: column; padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.1); z-index: 999; }
    .site-nav.open { display: flex; }
    .site-nav li { list-style: none; }
    .menu-toggle { display: block; }
    .header-cta .header-phone { display: none; }
}

@media (max-width: 600px) {
    input, select, textarea { font-size: 16px !important; }
    .hero-text h1 { font-size: 1.8rem; }
    .section { padding: 60px 0; }
    .section-title { font-size: 1.6rem; }
    .offers-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
    .offer-row { flex-direction: column; }
    .offer-row-image { width: 100%; min-height: 180px; }
    .footer-grid { grid-template-columns: 1fr; }
    .filters-main-row,
    .filters-range-row { grid-template-columns: 1fr; }
    .filters-actions { width: 100%; }
    .filters-actions .jg-btn {
        flex: 1;
        justify-content: center;
    }
    #offers-map { height: 350px; }
    .map-search-controls { flex-direction: column; align-items: stretch; }
    /* Hero search mobile fixes */
    .hero-search { padding: 16px; }
    .hero-search-row .jg-select,
    .hero-search-row .jg-location-autocomplete { min-width: 100%; }
    .hero-search-row input { min-width: 100%; }
    .hero-search--listing .filters-row { flex-direction: column; }
    .hero-search--listing .filter-group { min-width: 100%; }
    .hero-search--listing .hero-search-submit {
        width: 100%;
        margin-top: 8px;
    }
    /* Mobile bottom sheet — custom selects */
    .jg-select-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important; right: 0 !important;
        border-radius: 16px 16px 0 0;
        max-height: 0 !important;
        opacity: 1 !important;
        visibility: hidden !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease, visibility 0.3s ease, max-height 0.3s ease !important;
        z-index: 10002;
        border: none;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
        overflow: hidden;
    }
    .jg-select.open .jg-select-dropdown {
        max-height: 70vh !important;
        transform: translateY(0) !important;
        visibility: visible !important;
        overflow-y: auto;
    }
    .jg-select-options { max-height: calc(70vh - 100px); }
    .jg-select-option { padding: 14px 20px; font-size: 1rem; }
    .jg-select-search { margin: 12px; padding: 12px 16px; font-size: 1rem; }

    /* Mobile bottom sheet — location autocomplete */
    .jg-location-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important; right: 0 !important;
        border-radius: 16px 16px 0 0;
        max-height: 70vh !important;
        opacity: 1 !important;
        visibility: hidden !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease, visibility 0.3s ease !important;
        z-index: 10002;
        border: none;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
    }
    .jg-location-dropdown.open {
        transform: translateY(0) !important;
        visibility: visible !important;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .jg-location-item { padding: 14px 20px; }
    .jg-location-item-name { font-size: 1rem; }

    /* Mobile header + search in location bottom sheet */
    .jg-location-dropdown .jg-select-mobile-header {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .jg-location-mobile-search {
        display: block;
        position: sticky;
        top: 53px;
        z-index: 2;
        background: #fff;
        margin: 0 12px 8px;
        padding: 12px 16px;
        font-size: 1rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        width: calc(100% - 24px);
    }
    .jg-location-mobile-search:focus {
        border-color: var(--gold);
        outline: none;
        box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
    }

    /* Mobile header for bottom sheets */
    .jg-select-mobile-header { display: flex; }
}

/* --- Page content (polityka prywatności, etc.) --- */
.page-content { max-width: 800px; margin: 40px auto 0; line-height: 1.8; color: var(--text); }
.page-content h2 { font-size: 1.35rem; color: var(--green); margin: 40px 0 16px; }
.page-content p { margin-bottom: 16px; }
.page-content ul { margin: 0 0 20px 24px; }
.page-content li { margin-bottom: 8px; }
.page-content a { color: var(--gold-dark, var(--gold)); text-decoration: underline; }
.page-content a:hover { color: var(--green); }
.page-content strong { color: var(--green); }
.page-content table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 0.92rem; }
.page-content th { background: var(--green); color: #fff; text-align: left; padding: 12px 16px; font-weight: 600; }
.page-content td { padding: 12px 16px; border-bottom: 1px solid #e0e0e0; vertical-align: top; }
.page-content tr:nth-child(even) td { background: #f8f8f6; }
.page-content em { color: var(--text-light); }
