:root {
    /* ========================================
       THEME COLOR SYSTEM - Główne kolory motywu
       Zmień --jcm-theme-primary aby dostosować cały motyw
       ======================================== */
    
    /* PODSTAWOWY KOLOR MOTYWU - zmień tutaj główny kolor */
    --jcm-theme-primary: #667eea;          /* Główny kolor przewodni */
    --jcm-theme-primary-light: #8da3f0;    /* Jaśniejsza wersja */
    --jcm-theme-primary-dark: #4c5aa8;     /* Ciemniejsza wersja */
    --jcm-theme-primary-subtle: #e8ecfc;   /* Bardzo jasna wersja (tła) */
    --jcm-theme-secondary: #764ba2;        /* Dodatkowy kolor akcentujący */
    
    /* ALTERNATYWNE ZESTAWY KOLORÓW - odkomentuj wybrany i zakomentuj powyższy */
    
    /* NIEBIESKI KORPORACYJNY
    --jcm-theme-primary: #3b82f6;          
    --jcm-theme-primary-light: #60a5fa;    
    --jcm-theme-primary-dark: #1e40af;     
    --jcm-theme-primary-subtle: #dbeafe;   
    --jcm-theme-secondary: #1e40af;        
    */
    
    /* ZIELONY NIERUCHOMOŚCI  
    --jcm-theme-primary: #059669;          
    --jcm-theme-primary-light: #34d399;    
    --jcm-theme-primary-dark: #047857;     
    --jcm-theme-primary-subtle: #d1fae5;   
    --jcm-theme-secondary: #047857;        
    */
    
    /* FIOLETOWY ELEGANCKI
    --jcm-theme-primary: #8b5cf6;          
    --jcm-theme-primary-light: #a78bfa;    
    --jcm-theme-primary-dark: #7c3aed;     
    --jcm-theme-primary-subtle: #ede9fe;   
    --jcm-theme-secondary: #7c3aed;        
    */
    
    /* POMARAŃCZOWY ENERGICZNY
    --jcm-theme-primary: #f97316;          
    --jcm-theme-primary-light: #fb923c;    
    --jcm-theme-primary-dark: #ea580c;     
    --jcm-theme-primary-subtle: #fed7aa;   
    --jcm-theme-secondary: #ea580c;        
    */
    
    /* CZERWONY PREMIUM
    --jcm-theme-primary: #dc2626;          
    --jcm-theme-primary-light: #ef4444;    
    --jcm-theme-primary-dark: #b91c1c;     
    --jcm-theme-primary-subtle: #fecaca;   
    --jcm-theme-secondary: #b91c1c;        
    */
    
    /* SZARY MINIMALISTYCZNY
    --jcm-theme-primary: #374151;          
    --jcm-theme-primary-light: #4b5563;    
    --jcm-theme-primary-dark: #1f2937;     
    --jcm-theme-primary-subtle: #f3f4f6;   
    --jcm-theme-secondary: #1f2937;        
    */
    
    /* AUTOMATYCZNE ODCIENIE - bazują na primary */
    --jcm-theme-hover: var(--jcm-theme-primary-light);
    --jcm-theme-active: var(--jcm-theme-primary-dark);
    --jcm-theme-border: var(--jcm-theme-primary-subtle);
    --jcm-theme-text: var(--jcm-theme-primary-dark);
    
    /* ========================================
       ISTNIEJĄCE KOLORY - używają theme colors
       ======================================== */
    --jcm-heading_1: #1a1a1a;
    --jcm-heading_2: var(--jcm-theme-primary-dark); /* Używa dark theme color dla tytułów */
    --jcm-heading_3: #3d3d3d;
    --jcm-body_text: #000000;
    --jcm-body_small: #000000;
    --jcm-accent: var(--jcm-theme-primary);         /* Używa theme color */
    --jcm-accent_alt: var(--jcm-theme-secondary);   /* Używa theme color */
    --jcm-bg_card: #ffffff;
    --jcm-bg_light: #f8f9fa;
    --jcm-border_color: #e0e0e0;
    --jcm-badge_bg: var(--jcm-theme-primary-subtle); /* Używa theme color */
    --jcm-badge_text: var(--jcm-theme-text);         /* Używa theme color */
    

    
    --jcm-card_padding: 1.5rem;
    --jcm-gap_items: 1rem;
    --jcm-border_radius: 12px;
    --jcm-border_width: 1px;
    
    --jcm-card_shadow: 0 2px 12px rgba(0,0,0,0.08);
    --jcm-card_shadow_hover: 0 8px 24px rgba(0,0,0,0.15);
    --jcm-transition: 0.3s ease-in-out;
    --jcm-card_transform_hover: none; /* REMOVED: translateY(-4px) - unoszenie kart na hover */
    --jcm-hover_scale: 1;
}

/* ========================================
   GRID LOKALI - CARD STYLES
   ======================================== */

.lokal-card {
    background-color: var(--jcm-bg_card);
    border: var(--jcm-border_width) solid var(--jcm-border_color);
    border-radius: 0;
    padding: var(--jcm-card_padding);
    box-shadow: var(--jcm-card_shadow);
    transition: box-shadow var(--jcm-transition), border-color var(--jcm-transition), background-color var(--jcm-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lokal-card:hover {
    box-shadow: var(--jcm-card_shadow_hover);
    transform: var(--jcm-card_transform_hover) scale(var(--jcm-hover_scale));
}

/* Media Section */
.lokal-card__media {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: var(--jcm-gap_items);
    aspect-ratio: 16 / 10;
}

.lokal-card__image,
.lokal-card__image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Link - klikalny obrazek */
.lokal-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity var(--jcm-transition);
}

.lokal-card__image-link:hover {
    opacity: 0.9;
}

.lokal-card__image-link:focus {
    outline: 2px solid var(--jcm-theme-primary);
    outline-offset: 2px;
}

.lokal-card__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--jcm-bg_light);
    color: var(--jcm-body_small);
}

/* Overlay */
.lokal-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    opacity: 0;
    transition: opacity var(--jcm-transition);
    pointer-events: none;  /* Nie blokuje klików na link obrazka */
}

.lokal-card:hover .lokal-card__overlay {
    opacity: 0; /* Usunięto gradient hover effect */
}

.lokal-card__badge {
    align-self: flex-start;
    display: inline-block;
    padding: 0.5rem 0.875rem;
    background-color: var(--jcm-badge_bg);
    color: var(--jcm-badge_text);
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: auto;  /* Badge może być klikalny */
}

.lokal-card__price-per-m2-badge {
    align-self: flex-end;
    display: inline-block;
    padding: 0.5rem 0.875rem;
    background-color: rgba(0,0,0,0.7);
    color: #ffffff;
    border-radius: 0;
}

/* Content Section */
.lokal-card__content {
    display: flex;
    flex-direction: column;
    gap: var(--jcm-gap_items);
    flex-grow: 1;
}

.lokal-card__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.lokal-card__title {
    color: var(--jcm-heading_2);
    margin: 0;
}

.lokal-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--jcm-transition);
}

.lokal-card__title a:hover {
    color: var(--jcm-accent);
}

.lokal-card__investment-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
}

.lokal-card__investment-label {
    color: var(--jcm-body_small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lokal-card__investment-link {
    color: var(--jcm-accent);
    text-decoration: none;
    transition: color var(--jcm-transition);
}

.lokal-card__investment-link:hover {
    color: var(--jcm-accent_alt);
    text-decoration: underline;
}

/* Specifications */
.lokal-card__specs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--jcm-gap_items);
    background-color: var(--jcm-bg_light);
    border-radius: 0;
}

.lokal-card__spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--jcm-body_text);
}

.lokal-card__spec-icon {
    flex-shrink: 0;
}

.lokal-card__spec-text {
}

/* Pricing Section */
.lokal-card__pricing-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--jcm-gap_items) 0;
    border-top: var(--jcm-border_width) solid var(--jcm-border_color);
    border-bottom: var(--jcm-border_width) solid var(--jcm-border_color);
}

.lokal-card__price-block {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    justify-content: space-between;
}

.lokal-card__price-label {
    color: var(--jcm-body_small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lokal-card__price-value {
    color: var(--jcm-theme-primary);
}

/* Footer / CTA */
.lokal-card__footer {
    display: flex;
    gap: var(--jcm-gap_items);
    margin-top: auto;
    padding-top: var(--jcm-gap_items);
}

.lokal-card__btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background-color: var(--jcm-accent);
    color: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: box-shadow var(--jcm-transition), border-color var(--jcm-transition), background-color var(--jcm-transition);
    text-align: center;
}

.lokal-card__btn:hover {
    background-color: var(--jcm-accent_alt);
    /* transform: translateY(-2px); - REMOVED: unoszenie przycisku na hover */
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.lokal-card__btn-secondary {
    background-color: transparent;
    color: var(--jcm-accent);
    border: 2px solid var(--jcm-accent);
}

.lokal-card__btn-secondary:hover {
    background-color: var(--jcm-accent);
    color: #ffffff;
}

/* ========================================
   GRID INWESTYCJI - CARD STYLES
   ======================================== */

.inwestycja-card {
    background-color: var(--jcm-bg_card);
    border: var(--jcm-border_width) solid var(--jcm-border_color);
    border-radius: 0;
    padding: var(--jcm-card_padding);
    box-shadow: var(--jcm-card_shadow);
    transition: box-shadow var(--jcm-transition), border-color var(--jcm-transition), background-color var(--jcm-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.inwestycja-card:hover {
    box-shadow: var(--jcm-card_shadow_hover);
    transform: var(--jcm-card_transform_hover) scale(var(--jcm-hover_scale));
}

.inwestycja-card__title {
    color: var(--jcm-heading_2);
    margin: 0 0 0.5rem 0;
    font-family: var(--jcm-ocean-h2-font-family, inherit);
    font-size: var(--jcm-ocean-h2-font-size, inherit);
    font-weight: var(--jcm-ocean-h2-font-weight, inherit);
    line-height: var(--jcm-ocean-h2-line-height, inherit);
}

/* Link styles with higher specificity to override theme defaults */
article.inwestycja-card .inwestycja-card__title a,
.inwestycja-card .inwestycja-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--jcm-transition);
}

article.inwestycja-card .inwestycja-card__title a:hover,
.inwestycja-card .inwestycja-card__title a:hover {
    color: var(--jcm-accent);
}

.inwestycja-card__location {
    color: var(--jcm-body_small);
    margin: 0 0 var(--jcm-gap_items) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inwestycja-card__location-text {
    display: block;
}

.inwestycja-card__content {
    display: flex;
    flex-direction: column;
    gap: var(--jcm-gap_items);
    flex-grow: 1;
}

.inwestycja-card__media {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: var(--jcm-gap_items);
    aspect-ratio: 16 / 10;
}

.inwestycja-card__image-link,
.inwestycja-card__image,
.inwestycja-card__image-placeholder {
    width: 100%;
    height: 100%;
}

.inwestycja-card__image {
    object-fit: cover;
    display: block;
}

.inwestycja-card__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--jcm-bg_light);
    color: var(--jcm-body_small);
}

.inwestycja-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: auto 0 var(--jcm-gap_items) 0;
    padding: var(--jcm-gap_items);
    background-color: var(--jcm-bg_light);
    border-radius: 0;
}

.inwestycja-card__meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--jcm-body_text);
}

.inwestycja-card__meta-label {
    color: var(--jcm-body_small);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.inwestycja-card__meta-value {
    color: var(--jcm-heading_3);
}

/* Statystyki inwestycji */
.inwestycja-card__stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: var(--jcm-gap_items) 0;
}

.inwestycja-card__stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inwestycja-card__stat-label {
    color: var(--jcm-body_small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.inwestycja-card__stat-value {
    color: var(--jcm-theme-primary);
    font-weight: 600;
    font-size: 1rem;
}

.inwestycja-card__btn {
    padding: 0.875rem 1.5rem;
    background-color: var(--jcm-accent);
    color: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: box-shadow var(--jcm-transition), border-color var(--jcm-transition), background-color var(--jcm-transition);
    text-align: center;
    width: 100%;
}

.inwestycja-card__btn:hover {
    background-color: var(--jcm-accent_alt);
    /* transform: translateY(-2px); - REMOVED: unoszenie przycisku na hover */
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========================================
   GRID LAYOUT
   ======================================== */

.jcm-grid-1 {
    grid-template-columns: 1fr;
}

.jcm-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.jcm-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.jcm-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.lokale-grid,
.jcm-inwestycja-grid {
    display: grid;
    gap: var(--jcm-gap_items);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .jcm-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .lokal-card {
        padding: 1rem;
    }

    .inwestycja-card {
        padding: 1rem;
    }

    .jcm-grid-4,
    .jcm-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .jcm-grid-2 {
        grid-template-columns: 1fr;
    }


}

@media (max-width: 480px) {
    .lokal-card {
        padding: 0.75rem;
    }

    .inwestycja-card {
        padding: 0.75rem;
    }

    .jcm-grid-3,
    .jcm-grid-2 {
        grid-template-columns: 1fr;
    }

    .lokal-card__specs {
        padding: 0.75rem;
    }

    .lokal-card__btn {
        padding: 0.75rem 1rem;
    }

    .inwestycja-card__btn {
        padding: 0.75rem 1rem;
    }
}

/* ========================================
   SINGLE PAGE STYLES
   ======================================== */

/* .lokal-hero__title styles moved to unified system in style.css */

.lokal-hero__project {
    margin: 1rem 0 0 0;
}

.project-label {
    color: var(--jcm-body_small);
    text-transform: uppercase;
}

.project-link {
    color: var(--jcm-accent);
    text-decoration: none;
}

.project-link:hover {
    text-decoration: underline;
}

.lokal-card h2 {
    color: var(--jcm-heading_2);
    /* Removed margin - let global heading rules from style.css apply */
}

.detail-label {
    color: var(--jcm-body_small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--jcm-body_text);
}

.price-amount {
    color: var(--jcm-accent);
}

.price-gross {
    color: var(--jcm-body_small);
    text-transform: uppercase;
}

/* ========== INWESTYCJA HERO SECTION ========== */
.inwestycja-header {
    background: var(--color-bg, #ffffff);
    margin-bottom: var(--spacing-xxl, 48px);
}

.inwestycja-header__hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius, 8px);
    aspect-ratio: 16 / 9;
    margin-bottom: var(--spacing-lg, 24px);
}

.inwestycja-header__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inwestycja-header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

.inwestycja-header__content {
    padding: var(--spacing-lg, 24px) 0;
}

/* .inwestycja-header__title styles moved to unified system in style.css */

.inwestycja-header__description {
    color: var(--color-text-light, #666);
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Touch-friendly targets for mobile devices */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .lokal-card__btn,
    .inwestycja-card__btn {
        min-height: 48px;
        min-width: 48px;
        padding: 1rem;
    }
    
    .lokal-card,
    .inwestycja-card {
        margin-bottom: 1.5rem;
    }
}

/* Small screens */
@media (max-width: 768px) {
    :root {
        --jcm-card_padding: 1.2rem;
        --jcm-gap_items: 0.85rem;
    }
    
    .lokal-card__media,
    .inwestycja-card__media {
        aspect-ratio: 4 / 3;
    }
    
    .lokal-card__specs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lokal-card__footer {
        flex-direction: column;
    }
    
    .lokal-card__btn {
        width: 100%;
    }
    
    .inwestycja-header {
        max-height: 350px;
    }
    
    .inwestycja-header__hero-image {
        max-height: 350px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    :root {
        --jcm-card_padding: 1rem;
        --jcm-gap_items: 0.75rem;
    }
    
    .lokal-card__badge,
    .lokal-card__price-per-m2-badge {
        padding: 0.4rem 0.75rem;
    }
    
    .inwestycja-header {
        max-height: 280px;
    }
    
    .inwestycja-header__hero-image {
        max-height: 280px;
    }
}
