/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 2.0;
}

@font-face {
    font-family: 'Aileron-UltraLight';
    src: url('/static/fonts/Barlow/Barlow-ExtraLight.ttf') format('opentype');
}

@font-face {
    font-family: 'Aileron-Regular';
    src: url('/static/fonts/Barlow/Barlow-Regular.ttf') format('opentype');
}

@font-face {
    font-family: 'Font-Medium';
    src: url('/static/fonts/Barlow/Barlow-SemiBold.ttf') format('opentype');
}

body {
    background-image: url('/static/Images/hans.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    font-family: 'Aileron-UltraLight', sans-serif;
    line-height: 1.6;
    overflow-y: auto;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(8px);
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.7);
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    margin-bottom: 50px; 
}

header {
    background: none;
    padding: 0; 
}

.tech-name {
    font-size: 1.5em;
    font-family: 'Font-Medium', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0;
    width: 100%;
    margin: 0;
}

nav ul li {
    flex: 1;
    text-align: center;
    margin: 0;
    padding: 15px;
    border-bottom: 1px solid #ccc;
}

nav ul li a {
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    text-indent: -9999px;
    transition: background-image 0.3s ease, transform 0.3s ease;
}

nav ul li a.home {
    background-image: url('/static/Images/Header/home.png');
}

nav ul li a.about {
    background-image: url('/static/Images/Header/group.png');
}

nav ul li a.articles {
    background-image: url('/static/Images/Header/layers.png');
}

nav ul li a.github {
    background-image: url('/static/Images/Header/github.png');
}

nav ul li a.linkedin {
    background-image: url('/static/Images/Header/linkedin.png');
}

nav ul li a.home:hover {
    background-image: url('/static/Images/Header/home-grey.png');
    transform: translateY(-5px);
}

nav ul li a.about:hover {
    background-image: url('/static/Images/Header/group-grey.png');
    transform: translateY(-5px);
}

nav ul li a.articles:hover {
    background-image: url('/static/Images/Header/layers-grey.png');
    transform: translateY(-5px);
}

nav ul li a.github:hover {
    background-image: url('/static/Images/Header/github-grey.png');
    transform: translateY(-5px);
}

nav ul li a.linkedin:hover {
    background-image: url('/static/Images/Header/linkedin-grey.png');
    transform: translateY(-5px);
}

main {
    padding: 20px 0;
}

a {
    text-decoration: none;
}

/* Articles Layout */
.articles-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.article-tile {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 100%;
    min-height: 250px;
    height: auto;
}

.article-tile:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.article-description {
    overflow: visible; 
    white-space: normal; 
    width: 100%; 
    padding-right: 20px; 
    box-sizing: border-box; 
}

.article-content {
    flex: 3;
    padding-right: 20px;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.article-image {
    flex: 2;
    max-width: 400px;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Zapewnia, że cały link zachowuje się jak blok */
}

.article-tile {
    cursor: pointer; /* Upewnia się, że wskaźnik zmienia się na rękę, aby użytkownicy wiedzieli, że to klikane */
}

h2 {
    font-size: 2em;
    margin-bottom: 10px;
    font-family: 'Aileron-Regular', sans-serif;
}

h2 a {
    transition: color 0.3s ease;
}

h2 a:hover {
    color: grey;
}

p {
    margin-bottom: 20px;
}

.read-more {
    text-align: left;
    margin-top: 20px;
}

.read-more a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    font-style: italic;
}

.read-more a:hover {
    color: #555;
}

footer {
    color: #555;
    text-align: center;
    padding: 10px 0;
    border-radius: 20px;
    font-size: 1em;
    border-top: 1px solid #ccc;
}

.tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.tag {
    display: inline-block;
    padding: 10px 15px;
    background-color: white;
    color: #333;
    border-radius: 15px;
    text-decoration: none;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s;
}

.tag:hover {
    background-color: #d4d4d4;
    color: #000;
}

.active-tag {
    background-color: #333;
    color: white;
}


/* Media queries for mobile devices */
@media (max-width: 800px) {
    .container {
        width: 90%;
        margin: 5% auto;
        padding: 20px;
        border-radius: 10px;
    }

    .articles-container {
        flex-direction: column;
        gap: 20px;
    }

    .article-tile {
        flex-direction: column;
        padding: 15px;
        gap: 15px; 
        align-items: flex-start; 
        text-align: left; 
    }

    .article-content {
        flex: none;
        width: 100%; 
    }

    .article-image {
        flex: none;
        width: 100%; 
    }

    .article-image img {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }

    .article-description {
        font-size: 1em;
        line-height: 1.4;
    }

    h2 {
        font-size: 1.5em;
    }

    .tech-name {
        font-size: 1em;
    }

    .tag {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    nav ul li a {
        width: 50px;
        height: 50px;
    }

    footer {
        font-size: 0.8em;
        padding: 10px;
    }
}

@media (max-width: 500px) {
    .container {
        width: 95%;
        margin: 2% auto;
        padding: 10px;
        border-radius: 5px;
    }

    .article-tile {
        padding: 10px;
        gap: 10px;
    }

    .article-content {
        padding-right: 0;
    }

    h2 {
        font-size: 1.2em;
    }

    .tech-name {
        font-size: 0.8em;
    }

    .article-description {
        font-size: 0.9em;
    }

    .tag {
        padding: 5px 10px;
        font-size: 0.8em;
    }

    nav ul li a {
        width: 40px;
        height: 40px;
    }

    footer {
        font-size: 0.7em;
        padding: 5px;
    }
}

@media (max-width: 390px) {
    .container {
        width: 100%;
        margin: 0 auto;
        padding: 5%;
        border-radius: 5px;
    }

    .article-tile {
        padding: 5px;
        gap: 5px;
    }

    .article-content {
        padding-right: 0;
    }

    h2 {
        font-size: 1em;
    }

    .tech-name {
        font-size: 0.7em;
    }

    .article-description {
        font-size: 0.8em;
    }

    .tag {
        padding: 3px 8px;
        font-size: 0.7em;
    }

    nav ul li a {
        width: 30px;
        height: 30px;
    }

    footer {
        font-size: 0.6em;
        padding: 5px;
    }
}

