*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-image: radial-gradient(circle, rgb(30, 30, 30) 0%, rgb(20,20,20) 100%);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    padding: 10px;
    text-align: center;
    min-height: 100vh;
}

#title{
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(230, 230, 230);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-height: 100px;
    /* background-color: red; */
}

.subtitle{
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(219, 71, 71);
    display: flex;
    justify-content: center;
    gap: 20px;
}

.text{
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 20px;
}

.void{
    width: 200px;
}

#nav{
    background-color: #222;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(219, 71, 71);
    display: flex;
    justify-content:center;
    align-items: center;
    gap: 20px;
}

#nav a{
    text-decoration: none;
    color: rgb(219, 71, 71);
    transition: color 0.3s ease;
    /* background-color: cyan; */
}

#nav a:hover{
    transition: color 0.3s ease;
    color: #fff;
}

/* .med74{
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(219, 71, 71);
} */

#content{
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #222;
    border-radius: 5px;
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); */
    text-align: center;
    font-weight: 600;
    line-height: 1.5;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: #F34747 4px solid;
}

.box-grey{
    width: 800px;
    background-color: #222;
    border-radius: 5px;
    max-width:800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #222;
    border-radius: 5px;
    border: #F34747 4px solid;
    font-weight: 600;
    line-height: 1.5;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* background-color: rgba(255, 0, 0, 0.096); */
}

.patata{
    margin-top: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(219, 71, 71);
    display: flex;
    gap: 20px;
}

.patata img{
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.patata img:hover{
    transform: scale(1.02);
}

#links{
    display: flex;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(219, 71, 71);
    justify-content: center;
    align-items: center;
    gap: 20px;
}

@media (max-width: 600px) {
    #links {
        flex-direction: column;
        gap: 20px;
    }
}

.container{
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(219, 71, 71);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    /* background-color: rgba(255, 0, 0, 0.096); */
}

.container2{
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    gap: 20px;
    /* background-color: rgba(255, 0, 0, 0.096); */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.project1, .project2, .project3, .project4{
    width: 350px;
    height: 200px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.project1:hover, .project2:hover, .project3:hover, .project4:hover{
    transform: scale(1.02);
}

.icon {
    border: 2px solid rgb(219, 71, 71); 
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-right: 10px;
    background-color: #f74e4e;

}

.link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: rgb(219, 71, 71);
    transition: all 0.5s ease;
    gap: 4px;
    cursor: pointer; /* Add this line */
}

.link p {
    margin: 0;
    font-size: 1rem; /* Smaller text */
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.link:hover p {
    color: #fff; /* On hover, label turns white */
}

.hr{
    border: 1px solid rgb(219, 71, 71);
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#footer{
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(156, 154, 154);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#footer a{
    text-decoration: none;
    color: rgb(219, 71, 71);
    transition: color 0.3s ease;
}

#footer a:hover{    
    transition: color 0.3s ease;
    color: #fff;
}

#news-feed {
    display: block;           /* Always block so it can animate */
    opacity: 0;               /* Start hidden */
    pointer-events: none;
    bottom: 30px;
    position: fixed;
    transform: translateX(-50%);
    left: 50%;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    z-index: 9999;
    font-size: 17px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background: #222;
    transition: opacity 0.2s ease;
}

#news-feed.show {
    opacity: 1;
    pointer-events: auto;
}

.card {
    position: relative;
    display: block;
    width: 350px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    text-decoration: none;
    color: inherit;
    background: #222;
    transition: transform 0.3s;
}

.card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    left: 0;
    top: 0;
    z-index: 1;
    transition: transform 0.3s;
}

.card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 16px 10px 10px 10px;
    font-size: 1.3rem;
    text-align: center;
    font-weight: bold;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    opacity: 0; /* Hide by default */
    transition: opacity 0.3s;
}

.card:hover {
    transform: scale(1.03);
}

.card:hover img {
    transform: scale(1.07);
}

.card:hover .card-caption {
    opacity: 1; /* Show on hover */
}