.main-content-projects {
    grid-column: 1 / -1;     
    padding: 20px;
    margin-top: 20px;     
    display: flex;
    flex-direction: column;
    align-items: center; 
    margin-bottom: 60px;
    padding-bottom: 60px;
}

.main-content-projects h1 {
    color: var(--text-color);
    font-size: 2.5em;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px; }

.project-card {
    background-color: var(--accent);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.project-image {
    width: 100%;
    height: 200px;     object-fit: cover;     border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer; }

.project-card h3 {
    color: var(--text-color);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-color);
    font-family: "Questrial", sans-serif;
    font-size: 1em;
    line-height: 1.6;
    flex-grow: 1;     margin-bottom: 15px;
}

.project-links {
    margin-top: auto; }

.project-links a {
    color: var(--link-color);
    text-decoration: none;
    margin-right: 15px;
    font-weight: bold;
}

.project-links a:hover {
    text-decoration: underline;
}

.project-links small {
    display: block;
    font-size: 0.8em;
    color: var(--text-color);
    margin-bottom: 5px;
}

.project-title-logo {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.project-title-logo h3 {
    margin-bottom: 0;
    margin-right: 10px;
}

.project-logo {
    height: 30px;     width: auto;
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    padding-top: 100px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

header #theme-switch,
header #xmas-switch {
    position: fixed;
    top: 80px;  
    background-color: var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

header #theme-switch {
    right: 20px;
    top: 10px;
}

header #xmas-switch {
    right: 80px;
    top: 10px;
}

#return-home-btn {
    position: fixed;
    top: 10px;    
    left: 20px; 
    background-color: var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none; 
    text-decoration: none; 
}

#return-home-btn svg {
    fill: #222 !important; /* Dark color for light mode */
}

body.darkmode #return-home-btn svg {
    fill: #E8EAED !important; /* Light color for dark mode */
}

#xmas-arrow {
    position: fixed;
    top: 80px;     /* Increased from 10px to 30px */
    right: 73px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Questrial", sans-serif;
    color: var(--text-color);
    z-index: 1000;
    animation: fade-in 1.5s ease-out;
}

body.darkmode .project-card {
    background-color: #2a2a2a;     box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

body.darkmode .project-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

body.xmas-mode .project-card {
    border: 2px solid var(--xmas-accent);
}

.xmas-element {
    display: none; }

body.xmas-mode .xmas-element {
    display: block; }

#christmas-tree {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 100px;     height: auto;
    z-index: 1000; }

body.xmas-mode #snow-container {
    display: block; }

body.xmas-mode .section-divider.xmas-element {
    display: block; }


@media (max-width: 768px) {
    .main-content-projects h1 {
        font-size: 2em;
    }
    .projects-grid {
        grid-template-columns: 1fr;     }
    header #theme-switch,
    header #xmas-switch {
        top: 10px;
    }
    header #theme-switch {
        right: 10px;
    }
    header #xmas-switch {
        right: 70px;
    }
    #return-home-btn {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
}
