/* Section About Us */
.about-us-header h2 {
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 1rem 0;
}


.about-us-body {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1rem;
}

.about-us-body .content-card {
    gap: 1rem;

    & a {
        align-self: center;
    }

    & img {
        border-radius: var(--border-radius-md);
        border: 1px solid var(--color-purple);
        box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    }
}

.about-us-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    padding: 2rem;
    width: 100%;
}

/* Section Projects */

.section-projects-header {
    display: flex;
    flex-direction: column;

    & h2 {
        text-align: center;
        font-family: 'Lato', sans-serif;
        border-bottom: 1px solid var(--color-opacity-light-5);
        padding: 1rem 0;
        margin: 0;
    }
}

.tabs-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: fit-content;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-opacity-light-5);
    border-top: none;
    border-bottom-left-radius: var(--border-radius-md);
    border-bottom-right-radius: var(--border-radius-md);

    & .quick-link {
        opacity: 1;
    }

    & .quick-link:hover {
        color: #f3d377;
    }
}

@media (max-width: 768px) {
    .tabs-container {
        gap: 1rem;
    }
}

@media (max-width: 368px) {
    .tabs-container {
        gap: 0.25rem;
    }
}

.tabs-container .active {
    color: #f3d377;
}



/* Sub-section Blogs */
.blogs-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    margin: 2rem auto;
    gap: 1rem;
    justify-items: center;
    
    & .content-card {
        max-width: 500px;
    }
}


.blog-content-header {
    margin: 0 auto 1rem auto;
    width: 100%;

    & img {
        height: 230px;
        width: 100%;
        margin: 0 auto;
        object-fit: cover;
        border-radius: var(--border-radius-md);
        box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    }
}

.blog-content-body {
    margin: 0 auto;
    padding-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
    width: 100%;
}

.blog-content-body-info {
    width: 100%;
    display: flex;
    flex-direction: row;
    font-size: 0.8rem !important;
    opacity: 0.8;

    & .body-info-publish,
    & .body-info-counters {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }

    & .body-info-counters {
        margin: 0 0 0 auto;
    }
    
    & .bi-heart-fill {
        color: darkred;
    }
    
    & .bi-chat-dots-fill {
        color: cornflowerblue;
    }
}

.body-info-title {
    flex-grow: 1;
    width: 100%;
    text-align: center;
    transition: all 1s cubic-bezier(.23, 1, .32, 1);

    &:hover {
        color: var(--font-color);
    }

    &:hover .separator {
        border-color: var(--color-opacity-light-5);
        transform: translateX(5px); /* Moves right */
        animation: wiggle 0.3s ease-in-out infinite alternate;
    }
    
    & h3 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/* Keyframes for a smooth left-right movement */
@keyframes wiggle {
    0% {
        transform: translateX(-4px); /* Moves left */
    }
    100% {
        transform: translateX(4px); /* Moves right */
    }
}

.blog-summary {
    font-size: 1rem;
    line-height: 1.5;
    text-align: justify;
    color: #ddd; /* Light text color */
    background: rgba(60, 50, 70, 0.4);
    padding: 0.8rem;
    border-left: 4px solid var(--color-purple); /* Accent color */
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease-in-out;
    height: 230px; /* Adjust based on your layout */
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--color-purple) rgba(255, 255, 255, 0.1);

    & .bi-star-fill,
    & .updated-label {
        color: goldenrod;
    }
}

/* Scrollbar styling for WebKit-based browsers */
.blog-summary::-webkit-scrollbar {
    width: 6px;
}

.blog-summary::-webkit-scrollbar-thumb {
    background-color: var(--color-purple);
    border-radius: 3px;
}

.blog-summary::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

/* Hover effect */
.blog-summary:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.blogs-redirect {
    display: flex;
    justify-content: center;
    margin: 0.5rem auto;
}


/* Sub-section Projects */
.projects-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    margin: 2rem auto;
    gap: 1rem;
    justify-items: center;

    & .content-card {
        max-width: 500px;
    }
}

.project-preview-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0.5rem 0 0.5rem;
    height: 100%;
}

.project-preview-body {
    & .preview-repo-tags {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1rem 0.5rem 1rem;
    }
    & .tag {
        color: lightgray;
        padding: 0 0.5rem;
        border-radius: var(--border-radius-sm);
        margin: 0;
    }
    & .tag:hover {
        cursor: help;
    }
    & .tag-public {
        background-color: #42496e;
    }

    & .tag-forked {
        background-color: #385b76;
    }

    & .tag-stars i {
        color: darkgoldenrod;
    }

    & .tag-forks i {
        color: #53836a;
    }

    & .tag-language i {
        color: #627c7f;
    }

    & .tag-archived {
        background-color: darkred;
    }
}

.project-preview-body .preview-repo-summary {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-bottom: 1px solid var(--color-opacity-light-1);
    border-top: 1px solid var(--color-opacity-light-1);
    margin-bottom: 0.5rem;
    padding: 0.5rem;

    & h5 {
        font-size: 1.2rem;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        text-align: center;
        padding: 0;
        margin: 1rem 0 0 0;
    }
    & .repo-description {
        opacity: 0.5;
        margin: 0 1rem;
        font-size: 0.9rem;
        text-align: center;
        max-height: 150px;
        overflow: auto;
    }

    & .muted {
        color: var(--font-color);
        opacity: 0.5;
        font-size: 0.9rem;
        margin: 0 0 1rem 0;
        text-align: center;
    }
}

.project-preview-body .preview-repo-summary .categories-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;

    & .category-badge {
        color: goldenrod;
        padding: 0 0.35rem;
        opacity: 0.8;
        font-size: 0.8rem;
        text-align: center;
        background-color: var(--color-opacity-light-1);
        border-radius: var(--border-radius-lg);
        margin: 0;
    }
}

.project-preview-body .repo-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;

    & a {
        text-decoration: none;
        font-weight: bold;
        border: 1px solid var(--color-purple);
        color: var(--font-color);
        padding: 0.5rem 1rem;
        border-radius: var(--border-radius-sm);
        transition: all 0.3s ease-in-out;
    }

    & a:hover {
        background-color: var(--color-purple);
        color: #fff;
    }

    & .btn.disabled {
        opacity: 0.5;
        cursor: not-allowed !important;
        filter: grayscale(100%);
        pointer-events: unset;
    }
}


.project-preview-body .preview-repo-license {
    display: flex;
    flex-direction: row;
    justify-content: space-around;

    & p {
        display: inline-block;
        margin: 0.5rem 1rem;
    }
}

.project-preview-body .preview-repo-dates {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-top: 1px solid var(--color-opacity-light-1);
    padding: 0.5rem 0.5rem 0 0.5rem;

    & p {
        color: var(--font-color);
        opacity: 0.5;
        font-size: 0.9rem;
    }
}



.projects-container {
    & .modal {
        overflow: scroll;
    }
    
    & button {
        background-color: lightgray !important;
    }
    
    & button:hover {
        opacity: 0.75;
    }
    
    & .modal-content {
        backdrop-filter: blur(3px);
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
        color: lightgray;
        width: 80vw;
    }
    
    & .modal-header {
        height:30px;
        padding: 2rem;
    }
    
    & .modal-title {
        font-size:16px;
    }
    
    & .modal-body {
        padding: 5px 35px 20px;
        
        & h3 {
            text-align: center;
        }
        
        & p {
            padding-top:10px;
            font-size: 1.1em;
        }

        &::-webkit-scrollbar {
            width: 6px;
        }

        &::-webkit-scrollbar-thumb {
            background-color: var(--color-purple);
            border-radius: 3px;
        }

        &::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
        }
    }
}

.contacts-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    margin: 2rem auto;
    gap: 1rem;
}

.contacts-preview-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    
    & h3 {
        margin: 0 0.5rem;
    }
     
    & p {
        border-left: 2px solid var(--color-purple);
        padding: 0.5rem;
        margin: 0.5rem 1rem;
        transition: transform 0.2s ease-in-out;
    }
    
    & p:hover {
        transform: translateX(10px);
    }
}

.contacts-preview-body {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    padding: 20px;
}

.social-link {
    width: 75px;
    height: 75px;
    background-color: #2b303d;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px){
    .contacts-preview-body { gap: 1rem; }
    .social-link {
        width: 50px;
        height: 50px;
    }
    .social-link:hover {
        i { transform:translateY(-10px) !important;}
        &::after { bottom: 0 !important; }
    }
}

@media (max-width: 368px){
    .social-link {
        width: 40px;
        height: 40px;
    }
}

.social-link i {
    color: var(--font-color);
    position: relative;
    transition: transform 0.5s, color 0.5s;
}

.social-link:hover i {
    transform: translateY(-15px);
    color: var(--font-color);
}

.social-link::after {
    content: attr(title);
    position: absolute;
    bottom: -40px;
    font-size: 0.8rem;
    color: var(--font-color);
    opacity: 0;
    transition: bottom 0.5s ease, opacity 0.5s ease;
}

.social-link:hover::after {
    bottom: 10px;
    opacity: 1;
}

.contacts-youtube-header {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    
    & p {
        opacity: 0.8;
    }
}

.contacts-youtube-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin: auto;
}

#youtubeContainer {
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--border-radius-md);
}

.contacts-youtube-body a {
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-image: linear-gradient(darkred, darkred);
}


@media (max-width: 768px) {
    .about-us-body,
    .blogs-container,
    .project-container,
    .contacts-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 480px) {
    .about-us-body,
    .blogs-container,
    .project-container,
    .contacts-container {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)); /* Stacks on small screens */
    }
}
