.content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1.5rem;
    color: white;
    margin-top: 70px;
}

.content h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1.1;
    text-align: center;
    margin-bottom: 0.5rem;
}

.content p {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Stylizacja sekcji projektów */
.projects-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    overflow-y: auto;
    height: calc(100vh - 129px - 70px);
    position: relative;
}

/* PROSTE CIENIE - działające */
.projects-section::before,
.projects-section::after {
    content: '';
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1200px;
    height: 80px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.projects-section::before {
    top: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        transparent 100%);
}

.projects-section::after {
    bottom: 0;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        transparent 100%);
}

/* Klasy aktywujące cienie */
.projects-section.has-top-shadow::before {
    opacity: 1;
}

.projects-section.has-bottom-shadow::after {
    opacity: 1;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    justify-content: space-between;
    align-items: start;
    padding-bottom: 1rem;
    border-bottom: 1px solid #1d1d1d;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.category-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    font-family: var(--font);
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.category-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    font-family: var(--font);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1160px;
    margin: auto;
    align-items: stretch;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.project-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    width: 100%;
    border-radius: 10px;
    transition: transform 0.2s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover .project-image {
    transform: scale(1.03) translateY(-2px);
}

.project-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
}

.project-title {
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
    line-height: 1.3;
}

.project-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.project-categories {
    flex-shrink: 0;
    margin-bottom: 5px;
}

.project-category-badge {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    line-height: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex-shrink: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-content: flex-start;
    margin-bottom: 15px;
}

.project-tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1;
}

.project-links {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 35px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.3s ease;
    flex: 1;
    justify-content: center;
    min-height: 44px; /* Better touch targets */
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.no-projects {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    grid-column: 1 / -1;
    font-size: 1.1rem;
}

.loading-projects {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    grid-column: 1 / -1;
    font-size: 1.1rem;
}

/* Scrollbar */
.projects-section::-webkit-scrollbar {
    width: 6px;
}

.projects-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.projects-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.projects-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.projects-section {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Tablet */
@media (max-width: 1024px) {
    .projects-section {
        height: calc(100vh - 130px);
        padding: 0.75rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .filters-container {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .project-content {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .project-title {
        font-size: 1.3rem;
    }
    
    .project-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .projects-section {
        height: calc(100vh - 120px - 10px);
        padding: 15px;
    }
    
    .content {
        padding: 0.75rem 0.5rem;
        margin-top: 10px;
    }
    
    .content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .content p {
        font-size: 0.85rem;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .categories {
        justify-content: center;
        order: 2;
    }
    
    .search-container {
        max-width: 100%;
        min-width: auto;
        order: 1;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .project-card {
        border-radius: 8px;
    }
    
    .project-content {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
    
    .project-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    .project-links {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .project-link {
        min-height: 40px;
        font-size: 0.8rem;
        padding: 0rem 1rem;
    }
    
    .projects-section::before {
        top: 72px;
    }

    .projects-section::before,
    .projects-section::after {
        width: calc(100% - 1rem);
        height: 60px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .projects-section {
        height: calc(100vh - 110px);
        padding: 15px;
    }
    
    .content {
        padding: 0.5rem 0.25rem;
    }
    
    .content h1 {
        font-size: 1.3rem;
    }
    
    .content p {
        font-size: 0.8rem;
    }
    
    .filters-container {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .categories {
        gap: 0.25rem;
    }
    
    .category-btn, .sort-select {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .search-input {
        padding: 0.4rem 0.8rem 0.4rem 2.2rem;
        font-size: 0.8rem;
    }
    
    .search-icon {
        left: 0.6rem;
        font-size: 0.8rem;
    }
    
    .projects-grid {
        gap: 1rem;
    }
    
    .project-content {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .project-description {
        font-size: 0.75rem;
    }
    
    .project-category-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .project-tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
    
    .project-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-height: 36px;
    }
    
    .no-projects,
    .loading-projects {
        padding: 2rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .projects-section {
        height: calc(100vh - 100px);
    }
    
    .content {
        padding: 0.5rem;
    }
    
    .filters-container {
        margin-bottom: 0.75rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.5rem;
    }
}

/* High DPI Screens */
@media (min-resolution: 192dpi) {
    .project-card {
        border-width: 0.5px;
    }
    
    .category-btn,
    .project-link {
        border-width: 0.5px;
    }
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: space-between;
    align-items: start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.sort-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    height: 34px;
    transition: all 0.3s ease;
    font-family: var(--font);
}

.sort-select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sort-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.sort-select option {
    background-color: #0e0e0e;
    color: #f0f0f0;
}

.sort-select select:hover {
    border-color: #555;
    background-color: #1a1a1a;
}

.sort-select select:focus {
    border-color: #888;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .sort-container {
        margin: auto;
        justify-content: flex-end;
        order: 3;
    }
    
    .categories {
        justify-content: center;
        order: 2;
    }
    
    .search-container {
        max-width: 100%;
        min-width: auto;
        order: 1;
    }

    .sort-select {
        height: 30px;
        padding: 0.2rem 0.7rem;
    }
}