/* Custom Styles for Equal Thumbnails */
.thumbnail-74 {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* Creates a 4:3 aspect ratio */
    width: 100%;
    flex-shrink: 0;
    border-radius: 6px 6px 0 0;
}

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

/* Expanded thumbnail adjustments */
.project-card.expanded .thumbnail-74 {
    padding-top: 60%; /* Smaller ratio when expanded to give more space for content */
}

/* Custom background images for responsive design */
.desktop-background {
  background-image: url(../assets/img/background/avatar.png);
}

/* Media query for mobile devices */
@media (max-width: 767px) {
  .desktop-background {
    background-image: url(../assets/img/background/mobile-avatar.png);
  }
}

/* Custom styles for centered project grid */
.grid.centered-projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.grid.centered-projects > [class*='col-'] {
    flex: 0 0 auto;
}

/* Maintain 4 items per row on desktop, then center the remaining */
@media (min-width: 1024px) {
    .grid.centered-projects > .col-3-12 {
        width: 25%;
        max-width: 25%;
    }
}

/* 2 items per row on tablet */
@media (max-width: 1023px) and (min-width: 768px) {
    .grid.centered-projects > .col-3-12 {
        width: 50%;
        max-width: 50%;
    }
}

/* 1 item per row on mobile */
@media (max-width: 767px) {
    .grid.centered-projects > .col-3-12 {
        width: 100%;
        max-width: 100%;
    }
}

/* Interactive Project Cards */
.project-card {
    color: #202020;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    outline: none;
    border: none;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    height: auto !important;
}

.project-card.expanded {
    overflow: visible !important;
    height: auto !important;
}

.project-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
    transform: translateY(-2px);
}

.project-card:focus {
    outline: none;
}

.project-card:hover .name-74 {
    background: #f5f5f5; /* Subtle light grey background on hover */
}

.project-card .name-74 {
    padding: 15px 20px;
    background: #FFFFFF;
    border-radius: 0 0 6px 6px;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* Override equalElement behavior for project cards */
.project-card .name-74.equalElement {
    height: auto !important;
    min-height: 80px !important;
}

.project-card .name-74.table {
    display: flex !important;
}

.project-card .name-74 .cell {
    display: flex;
    flex-direction: column;
    height: auto;
    flex-grow: 1;
}

.project-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.project-description {
    display: none !important;
    margin: 15px 0;
    line-height: 1.5;
    opacity: 0 !important;
    transition: all 0.3s ease;
    max-height: 0 !important;
    overflow: hidden !important;
    font-size: 14px;
    color: #555;
}

.project-card.expanded .project-description {
    display: block !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    transition: all 0.3s ease;
    margin: 15px 0 30px 0;
}

.project-card.expanded .name-74 {
    min-height: auto;
    padding-bottom: 80px;
}

.project-link-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #202020;
    color: white;
    padding: 15px 20px;
    text-align: center;
    display: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0 0 6px 6px;
    z-index: 2;
}

.project-link-btn:hover {
    background: #333333;
}

.project-card.expanded .project-link-btn {
    display: block;
}

.project-link-btn span {
    font-weight: 500;
    font-size: 14px;
}

/* Animation for card expansion */
.project-card.expanded {
    transform: scale(1.02);
    border: 3px solid #202020 !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3) !important;
    overflow: visible !important;
    height: auto !important;
    z-index: 10;
    border-radius: 6px !important;
}

.project-card.expanded .name-74 {
    background: #f8f9fa;
    min-height: auto !important;
    height: auto !important;
    padding: 15px 20px 80px 20px !important;
    overflow: visible !important;
    justify-content: flex-start !important;
    border-radius: 0 0 6px 6px !important;
}

/* Override equalElement behavior for expanded cards */
.project-card.expanded .name-74.equalElement {
    height: auto !important;
    min-height: auto !important;
}

.project-card.expanded .name-74.table {
    display: flex !important;
}
