:root {
    /* Colors */
    --primary-color: #0F172A; /* Deep Navy - Professional, Trust */
    --primary-light: #1E293B;
    --accent-color: #C5A065; /* Gold/Bronze - Luxury */
    --accent-hover: #D4AF77;
    
    --bg-body: #F9FAFB; /* Cool neutral */
    --bg-warm: #F3EFE9; /* Warm Beige - inspired by aibizneslab */
    --bg-white: #FFFFFF;
    
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --text-light: #F3F4F6;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navbar */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,255,255,0.3);
    font-weight: 600;
}

.btn-secondary:hover {
    border-color: var(--bg-white);
    background-color: rgba(255,255,255,0.1);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    /* Gradient background inspired by Whimsical but deeper/professional */
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: var(--bg-white);
    padding: 6rem 0 10rem; /* Extra padding bottom for search overlap */
    position: relative;
    overflow: visible; /* Allow search box to overflow */
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle pattern or noise could go here */
    background-image: radial-gradient(circle at 80% 20%, rgba(197, 160, 101, 0.15) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text-center {
    text-align: center;
    max-width: 800px;
    margin-bottom: 3rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
    min-height: 1.2em; /* Prevent layout shift */
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-color);
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.highlight-text {
    color: var(--accent-color);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    font-weight: 300;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Search Box Wrapper to offset it */
.search-box-wrapper {
    width: 100%;
    max-width: 1000px;
    margin-bottom: -14rem; /* Pull it down to overlap next section if wanted, or just sit nicely */
    position: relative;
    z-index: 10;
}

/* Search Box - "Glassmorphism" feel */
.search-box {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem;
}

.search-field label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.search-field select,
.search-field input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    outline: none;
}

.search-divider {
    width: 1px;
    height: 50px;
    background-color: #E5E7EB;
}

.search-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    height: 100%;
    min-height: 60px;
}

.search-btn:hover {
    background-color: var(--accent-hover);
}

/* Offers Section */
.section {
    padding: var(--spacing-lg) 0;
}

/* Add top margin to first section to account for search box overlap */
.offers {
    margin-top: 6rem; 
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.offer-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid #f0f0f0;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.offer-image {
    position: relative;
    height: 220px;
    background-color: #eee;
}

.offer-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.offer-tag.type-rent {
    background-color: var(--accent-color);
}

.offer-details {
    padding: 1.5rem;
}

.offer-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.offer-specs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.offer-specs i {
    color: var(--accent-color);
    margin-right: 0.25rem;
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.details-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.details-link:hover {
    color: var(--primary-color);
}

/* About Section */
.about-us {
    background-color: var(--bg-warm); /* The warm beige request */
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-content .lead {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-content p {
    margin-bottom: 1.5rem;
    color: #4B5563;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 2px;
}

.team-photo {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* Contact Section */
.contact {
    background-color: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    padding-right: 2rem;
}

.contact-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.icon-box {
    width: 50px;
    height: 50px;
    background-color: var(--bg-warm);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.info-item p {
    color: var(--text-muted);
}

.info-item a:hover {
    color: var(--accent-color);
}

.contact-form-wrapper {
    background-color: var(--bg-body);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.full-width {
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col p {
    color: #9CA3AF;
    margin-bottom: 0.5rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #9CA3AF;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #6B7280;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding-right: 0;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-lg {
        width: 100%;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .search-field {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 1rem;
    }

    .search-divider {
        display: none;
    }

    .search-btn {
        width: 100%;
        border-radius: var(--radius-lg); /* Match container radius when stacked */
        margin-top: 0.5rem;
    }
    
    .search-box-wrapper {
        margin-bottom: -10rem;
    }
    
    .offers {
        margin-top: 8rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ═══════════════════════════════════════════
   Scroll animation (przeniesione z JS)
═══════════════════════════════════════════ */
.offer-card,
.about-content,
.section-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.offer-card.visible,
.about-content.visible,
.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   Offer image (dynamiczne karty)
═══════════════════════════════════════════ */
.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #d1d5db;
    font-size: 2.5rem;
}
.details-link {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--accent-color);
    font-weight: 600;
    padding: 0;
}
.details-link:hover { color: var(--primary-color); }

/* ═══════════════════════════════════════════
   Offer Filters
═══════════════════════════════════════════ */
.offer-filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #E5E7EB;
    background: white;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}
.offers-loading,
.offers-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Search results info bar */
.search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-warm);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
    flex-wrap: wrap;
}
.search-clear {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 50px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.search-clear:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ═══════════════════════════════════════════
   Modal
═══════════════════════════════════════════ */
.offer-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.offer-modal.active { display: flex; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 860px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    margin: auto;
    z-index: 1;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: rgba(0, 0, 0, 0.8); }

/* Gallery */
.modal-gallery {
    position: relative;
    height: 420px;
    background: #111;
}
.modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.gallery-prev { left: 1rem; }
.gallery-next { right: 1rem; }
.gallery-prev:hover,
.gallery-next:hover { background: rgba(0, 0, 0, 0.8); }
.gallery-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Modal body */
.modal-body {
    padding: 2rem;
    max-height: 55vh;
    overflow-y: auto;
}
.modal-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.modal-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.modal-tag.type-rent { background: var(--accent-color); }
.modal-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.modal-title {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}
.modal-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Specs grid */
.modal-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
}
.spec-item i     { font-size: 1.1rem; color: var(--accent-color); }
.spec-item span  { font-weight: 600; font-size: 0.9rem; }
.spec-item label { font-size: 0.72rem; color: var(--text-muted); }

/* Opis */
.modal-description { margin-bottom: 1.5rem; }
.modal-description h4,
.modal-contact h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}
.opis-text {
    font-size: 0.875rem;
    line-height: 1.75;
    color: #4B5563;
}

/* Kontakt */
.contact-agent {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.contact-agent .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-secondary-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-secondary-dark:hover {
    background: var(--primary-color);
    color: white;
}

/* Modal responsive */
@media (max-width: 768px) {
    .modal-gallery { height: 240px; }
    .modal-body    { padding: 1.25rem; }
    .modal-specs   { grid-template-columns: repeat(3, 1fr); }
    .modal-price   { font-size: 1.2rem; }
}
