/*--------------------------------------------------------------
# Page Przegląd Samochodów - Responsive Styles
--------------------------------------------------------------*/

#przeglad-samochodow {
    color: #2D2D2D;
}

#przeglad-samochodow p {
    font-size: 18px;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0.18px;
}

#przeglad-samochodow h2 {
    font-size: 40px;
}

#przeglad-samochodow h3 {
    font-size: 20px;
}

/* Strona kategorii samochodów */
.categories-page {
    min-height: 100vh;
}

/* Header sekcja */
.categories-header {
    padding: 116px 0 46px 0;
}

.categories-header h1 {
    color: #28BD3F;
    font-size: 48px;
    margin: 0;
}

/* Sekcje kategorii */
.category-section {
    background-color: #F2F2F2;
    padding: 55px 0 84px;
    margin-bottom: 40px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    margin-bottom: 40px;
}

/* Karty kategorii i marek - ujednolicone */
.categories-grid,
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(209px, 1fr));
    gap: 29px;
    margin-top: 40px;
}

.category-card,
.brand-card {
    width: 209px;
    height: 209px;
    flex-shrink: 0;
    border-radius: 15px;
    background-color: #FFF;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.05);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    border: none;
    padding-bottom: 16px;
}

.brand-card {
    background-color: #F2F2F2;
}

.category-card:hover,
.brand-card:hover {
    background-color: #28BD3F;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(40, 189, 63, 0.3);
}

.category-card:hover h3,
.brand-card:hover .brand-name {
    color: #FFF;
}

.category-icon,
.brand-logo {
    transition: all 0.3s ease;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-name,
.brand-name {
    font-size: 20px;
    margin-bottom: 0;
    font-weight: 600;
    margin-top: 20px;
}

/* Sekcja marek */
.brands-section {
    padding: 30px 0 46px 0;
}

.brands-subsection {
    margin-bottom: 50px;
    position: relative;
}

.brands-subsection .subsection-title {
    display: flex;
    background-color: white;
    overflow-x: hidden;
}

.brands-subsection .subsection-title:after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #28BD3F;
    top: 21px;
    left: 10px;
    position: relative;
}

.subsection-title {
    margin: 0 0 20px;
    font-size: 24px;
    color: #2D2D2D;
}

/* Style dla logo marki */
.brand-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Style dla placeholder'a gdy nie ma logo */
.brand-logo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E8E8E8;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
}

/* Hover effect dla kart kategorii z białymi ikonami przeznaczenia */
.category-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-card:hover {
    background-color: #28BD3F !important;
    color: white !important;
}

/* Hover effect dla nazw kategorii */
.category-card:hover .category-name {
    color: #FFFFFF !important;
}

/* Style dla ikon - normalna i hover */
.category-icon .icon {
    transition: all 0.3s ease;
}

.category-icon .icon.hover {
    display: none; /* Biała ikona ukryta domyślnie */
}

.category-icon .icon.normal {
    display: block; /* Zielona ikona widoczna domyślnie */
}

/* Na hover - pokaż białą ikonę, ukryj zieloną */
.category-card:hover .icon.normal {
    display: none;
}

.category-card:hover .icon.hover {
    display: block;
}

/* Animacje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card,
.brand-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

@media (min-width: 1024px) and (max-width: 1280px) {
    .category-card, .brand-card {
        width: 140px;
        height: 140px;
        padding: 25px 15px;
        margin: auto;
    }

    #przeglad-samochodow .category-card h3, #przeglad-samochodow .brand-card h3 {
        font-size: 18px;
        margin: auto;
    }

    .category-card svg, .brand-card svg,
    .category-card img, .brand-card img {
        width: 60px;
        height: 60px;
    }


    .categories-grid, .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 18px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - TABLET (768px - 1024px)
   ======================================== */
@media (max-width: 1023px) {
    .categories-header h1 {
        font-size: 42px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .categories-grid,
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 25px;
    }
    
    .category-card,
    .brand-card {
        width: 180px;
        height: 180px;
        padding: 25px 15px;
        margin: auto;
    }
    
    .category-name,
    .brand-name {
        font-size: 18px;
    }
    
    .categories-header {
        padding: 46px 0 35px 0;
    }
    
    .category-section {
        padding: 45px 0 70px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE (max-width: 767px)
   ======================================== */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }
    
    .categories-header {
        padding: 60px 0 30px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .subsection-title {
        font-size: 20px;
    }
    
    .categories-grid,
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        margin-top: 30px;
    }
    
    .category-icon, .brand-logo {
        width: 90px;
        height: 90px;
    }
    .category-icon svg, .brand-logo svg {
        width: 70px;
        height: 60px;
    }

    .category-name,
    .brand-name {
        font-size: 16px;
    }
    
    .category-section {
        padding: 35px 0 50px;
        margin-bottom: 30px;
    }
    
    .brands-section {
        padding: 25px 0 35px 0;
    }
    
    .brands-subsection {
        margin-bottom: 40px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SMALL MOBILE (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .categories-header {
        padding: 30px 0 25px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .subsection-title {
        font-size: 18px;
    }
    
    .category-card,
    .brand-card {
        width: 100%;
        height: 140px;
        padding: 15px 10px;
    }
    
    .category-name,
    .brand-name {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .category-section {
        padding: 25px 0 40px;
        margin-bottom: 25px;
    }
    
    .brands-section {
        padding: 20px 0 30px 0;
    }
    
    .brands-subsection {
        margin-bottom: 30px;
    }
    
    .section-header {
        margin-bottom: 25px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - EXTRA SMALL MOBILE (max-width: 360px)
   ======================================== */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .categories-header h1 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .categories-grid,
    .brands-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-card,
    .brand-card {
        height: 120px;
        padding: 15px 10px;
    }
    
    .category-icon,
    .brand-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .category-name,
    .brand-name {
        font-size: 13px;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION (max-height: 500px)
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    
    .category-section {
        padding: 25px 0 35px;
    }
    
    .brands-section {
        padding: 20px 0 25px 0;
    }
    
    .categories-grid,
    .brands-grid {
        margin-top: 20px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .category-card,
    .brand-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .categories-header {
        background: none !important;
        color: #000 !important;
    }
    
    .category-section {
        background: none !important;
    }
}
@media (min-width: 916px) and (max-width: 1024px) {
	.categories-header {
		padding-top: 115px;
	}
}