body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 60px;
    width: calc(100% - 100px); 
    min-width: 1600px;
    text-align: center;
    margin: auto;
    position: relative;
    height: 800px;
    overflow: hidden;
}

.container-empty {
    max-width: 800px;
    margin: 100px auto 20px;
    min-height: auto;
    height: auto;
    text-align: center;
    margin: auto;
}

.projects {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    justify-items: center;
    padding: 20px;
    max-height: 650px; 
    overflow-y: auto;
}

.project {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 350px;
    margin: 0 auto;
    text-align: center; 
    justify-self: start;
}

.btn-see-photos {
    background-color: #f44336;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    display: inline-block;
    margin: 0;
    justify-self: start;
}

.btn-see-photos:hover {
    background-color: #c62828;
}

.project h2 {
    margin: 0;
    padding: 10px 0;
    color: rgb(92, 148, 253);
    font-size: 1.5rem;
}

.project a {
    color: #ffffff;
    text-decoration: none;
    margin-top: 20px;
}

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

.photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
    aspect-ratio: 1;  
    min-width: 300px; 
    margin-left: auto;
    margin-right: auto;
}

.photo {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 5px;
}

.photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-projects {
    text-align: center;
    margin: 20px 0;
}

.no-projects p {
    font-size: 1.2em;
    margin-bottom: 50px;
}

.social-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: background-color 0.5s ease, transform 0.5s ease;
    margin: 0 auto;
}

.social-card:hover {
    background-color: #fffffb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.social-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.social-card-content h3 {
    margin: 0;
}

h1 {
    text-align: center;
    color: #da251c; 
    font-size: 3rem; 
    margin: 0 auto 40px;
    width: 100%;
}

.btn-new-project {
    float: right;
    background-color: #f44336; 
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    margin-bottom: 20px; 
    font-size: 1.3em;
}
.btn-new-project:hover {
    background-color: #c62828; 
}

.btn-new-project-empty {
    float: none;
    background-color: #f44336;
    display: block;
    width: fit-content;
    margin: 20px auto;
    font-size: 1em;
}

.btn-new-project-empty:hover {
    background-color: #c62828; 
}

.search-container {
    position: relative;
    max-width: 400px;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 45px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #f44336;
    box-shadow: 0 0 5px rgba(244, 67, 54, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
}

.search-input:focus + .search-icon {
    color: #f44336;
}

.projects::-webkit-scrollbar {
    width: 8px;
}

.projects::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.projects::-webkit-scrollbar-thumb {
    background: #da251c;
    border-radius: 4px;
}

.projects::-webkit-scrollbar-thumb:hover {
    background: #b71c1c;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        width: 90%;
        min-width: auto;
        margin: 80px auto 20px;
    }

    .container-empty {
        margin: 80px auto 20px;
        padding: 20px;
        height: auto;
    }

    .no-projects {
        margin: 10px 0;
    }

    .social-cards {
        margin: 20px 0;
        gap: 20px;
    }

    .projects {
        grid-template-columns: 1fr;
        padding: 5px;
        max-height: 600px;
        overflow-y: auto; 
        scrollbar-width: thin;
    }

    .projects::-webkit-scrollbar {
        width: 8px;
    }

    .projects::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .projects::-webkit-scrollbar-thumb {
        background: #da251c;
        border-radius: 4px;
    }

    .projects::-webkit-scrollbar-thumb:hover {
        background: #b71c1c;
    }

    .project {
        width: 100%;
        max-width: 300px;
        padding: 10px;
        margin: 0 auto;
    }

    .project h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .photos {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        height: auto;
        width: 100%;
    }

    .photo {
        aspect-ratio: 1/1;
        height: auto;
        width: 100%;
    }

    .photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }

    .btn-see-photos {
        margin-top: 10px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    h1 {
        font-size: 2rem;
        margin: 20px 0;
    }

    .btn-new-project {
        font-size: 1em;
        padding: 8px 16px;
    }

    .search-container {
        max-width: 50%;
        align-items: center;
    }

    .search-input {
        padding: 8px 25px 8px;
        font-size: 11px;
        width: 90%;
    }

    .search-icon {
        font-size: 11px;
        left: 12px;
    }
}
