:root {
    --main-color: #3498db;
}

.green-theme {
    --main-color: #2ecc71;
}

/* Base styles */
body {
    display: flex;
    flex-direction: column; /* Arrange children vertically */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Main content */
main {
    flex-grow: 1; /* Allow main content to grow and push footer down */
    margin-left: 0px;
    padding: 30px;
    margin-top: 0px;
}

p {
    margin-block-start: 0px;
}

/* Project content */
.project-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.image-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.project-description {
    width: 100%;
    line-height: 1.6;
}

#computer {
    scroll-margin-top: 25px;
}

#archi {
    scroll-margin-top: 25px;
}

.styled-link {
    color: var(--main-color);
    font-weight: bold;
    text-decoration: none; /* Optional: removes underline */
  }
  
.styled-link:hover {
    text-decoration: underline; /* Optional: adds underline on hover */
  }

.project-description h3 {
    margin-top: 0px;
    margin-bottom: 10px;
    color: var(--main-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.project-description ul {
    padding-left: 20px;
}

.project-description li {
    margin-bottom: 5px;
}

/* Code blocks */
pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Media embeds */
a img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

a[href*="youtu"] {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

a[href*="youtu"]:hover {
    transform: scale(1.05);
    z-index: 10; /* Ensures the zoomed container appears above other elements */
}

a[href*="youtu"] img {
    position: absolute;
    top: -16.75%; /* This crops the top black bar */
    left: 0;
    width: 100%;
    height: 133.5%; /* Compensates for the cropped portions */
    object-fit: cover;
    object-position: center;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
}

a[href*="youtu"]::after {
    content: "";
    position: absolute;
    top: 45%; /* Adjust from 50% to 45% to move it up slightly */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 0, 0, 0.7);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

a[href*="youtu"]::before {
    content: "";
    position: absolute;
    top: 45%; /* Also adjust this from 50% to 45% */
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid white;
    z-index: 1;
    transition: transform 0.3s ease;
}


a[href*="youtu"]:hover::after {
    background-color: rgba(255, 0, 0, 0.9);
}

a[href*="youtu"]:hover::before {
    transform: translate(-40%, -50%) scale(1.1);
}

/* Responsive layout */
@media (min-width: 768px) {
    .project-content {
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: nowrap;
    }
    
    .image-container {
        width: 40%;
        min-width: 40%;
        max-width: 40%;
    }
    
    .project-description {
        width: 60%;
        padding-left: 20px;
    }

}

@media (min-width: 1200px) {
    .image-container {
        width: 40%;
        min-width: 40%;
        max-width: 40%;
    }
    
    .project-description {
        width: 60%;
    }

    footer {
        padding: 15px 15px 15px 15px !important; /* top right bottom left */
    }
}


/* Additional styles */

h1 {
    color: #2c3e50;
    text-align: center;
}

h2 {
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-align: center;
}

h3 {
    color: var(--main-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.features {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

ul {
    padding-left: 20px;
}

.github-link {
    text-align: center;
    margin: 20px 20px;
  }
  
  .github-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #24292e;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
  }
  
  .github-button:hover {
    transform: scale(1.1);
  }
  
  .github-icon {
    width: 25px;
    height: 25px;
    margin-left: 8px;
  }
  
  /* Override any general styling that might affect the GitHub icon */
  .github-button img.github-icon {
    width: 25px !important;
    height: 25px !important;
    display: inline-block !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  

  /* YouTube button styling override */
a[href*="youtube.com/@attiladeri4817"], 
a[href*="www.youtube.com/@attiladeri4817"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FF0000; /* YouTube red */
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: all 0.3s ease-in-out;
  /* Override the YouTube link styles */
  position: static;
  width: auto;
  padding-top: 10px;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 0;
}

/* YouTube button hover effect */
a[href*="youtube.com/@attiladeri4817"]:hover,
a[href*="www.youtube.com/@attiladeri4817"]:hover {
  transform: scale(1.1);
  background-color: #CC0000; /* Darker red on hover */
}

/* Override the pseudo-elements */
a[href*="youtube.com/@attiladeri4817"]::before,
a[href*="youtube.com/@attiladeri4817"]::after,
a[href*="www.youtube.com/@attiladeri4817"]::before,
a[href*="www.youtube.com/@attiladeri4817"]::after {
  display: none;
}

/* YouTube icon styling */
a[href*="youtube.com/@attiladeri4817"] img,
a[href*="www.youtube.com/@attiladeri4817"] img {
  width: 25px !important;
  height: 25px !important;
  display: inline-block !important;
  margin-left: 8px !important;
  margin-bottom: 0 !important;
  vertical-align: middle !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: static !important;
  object-fit: contain !important;
}

footer {
    font-size: 0.75rem;
    margin-top: auto;
    text-align: center;
    padding: 20px;
    padding-top: 15px;
    padding-bottom: 88px;
    background-color: #2c3e50;
    color: white;
}

footer p {
    margin-bottom: 0;
  }

.welcome-projects {
    text-align: center;
    margin-bottom: 25px;
}
  