/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Breakpoint */
@media (max-width: 480px) {
    .opaque-container {
        margin: 5rem 1.5rem 1.5rem 1.5rem;
        padding: 1rem 0 2rem;
    }

    .projects-container {
        padding: 0.5rem;
        gap: 2rem;
    }

    .project-item {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1rem;
    }

    .project-image-container {
        margin-left: auto;
        margin-right: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        width: auto;
        height: 350px;
    }

    .secondary-btn {
        align-self: center !important;
        font-size: 0.75rem;
        padding: 0.35rem 0.8rem;
    }

    .project-details-images img {
        width: 100%;
    }
}

/* Tablet Breakpoint */
@media (min-width: 481px) and (max-width: 768px) {
    .opaque-container {
        margin: 6rem 2rem 2rem 2rem;
        padding: 2rem 0;
    }

    .projects-container {
        padding: 1rem;
        gap: 2rem;
    }

    .project-item {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 0 2rem;
    }

    .project-image-container {
        margin-left: auto;
        margin-right: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .secondary-btn {
        align-self: center;
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }

    .project-details {
        position: relative;
        z-index: 15 !important;
        display: none;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        text-align: left !important;
    }

    .project-item.expanded .project-details {
        display: block !important;
        opacity: 1 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .project-details ul {
        text-align: left !important;
        padding-left: 1.5em !important;
    }

    .project-details li {
        text-align: left !important;
    }

    .project-details strong {
        text-align: left !important;
    }

    .project-details-images {
        gap: 1rem;
        margin: 1rem 0 1rem 0;
    }

    .project-details-images img {
        width: 300px;
    }
}

/* Desktop Breakpoint */
@media (min-width: 769px) {
    .opaque-container {
        max-width: 1200px;
        margin: 5.5rem 2rem 1rem;
        padding: 2rem 0;
    }

    .projects-container {
        gap: 2rem;
    }

    .project-item {
        padding: 0 2rem;
        gap: 2rem;
    }

    .project-details-images img {
        max-width: 400px;
        width: 100%;
    }
}

body {
    background: linear-gradient(#112846EE, #112846EE), url("/images/web-pictures/projects-page.jpg");
    background-size: cover;
    width: 100%;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.opaque-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 31px;
    animation: fadeInUp 0.2s ease-out forwards;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 15;
}

.page-title {
    color: #ffffff;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.2s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #ffffff, #2196F3);
    border-radius: 2px;
}

.projects-intro {
    text-align: center;
    color: #e0e0e0;
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.projects-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.project-item {
    display: flex;
    border-radius: 10px;
    opacity: 0;
}

.project-item:nth-child(even) {
    animation: slideInLeft 0.2s ease-out forwards;
    animation-delay: 0.1s;
}

.project-item:nth-child(odd) {
    animation: slideInRight 0.2s ease-out forwards;
    animation-delay: 0s;
}

.project-image-container {
    flex-shrink: 0;
    width: 300px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.05);
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.project-title {
    color: #112846;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.project-description {
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    display: block;
}

.company-name {
    color: white;
    text-align: left;
    margin: 0;
    font-size: 1.4rem;
}

.secondary-btn {
    padding: 0.45rem 1.1rem;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.secondary-btn:hover {
    background-color: #ffffff;
    color: #112846;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.secondary-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}

.project-details {
    display: none;
    margin-top: 1rem;
    color: #fff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(59, 78, 102, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-item.expanded .project-details {
    display: block;
    opacity: 1;
    max-height: max-content;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}

.project-details-images {
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
    margin: 1rem 0 0.5rem 0;
}

.project-details-images img {
    height: auto;
    height: auto;
    height: auto;
    height: auto;
    border-radius: 10px;
    color: white;
  }
}

.feature-title {
    font-weight: 500;
    color: #ffffff;
    display: inline-block;
    margin-right: 0.5rem;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.image-modal-content {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    margin: auto;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.image-modal-close {
    position: absolute;
    top: 16px;
    right: 28px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1060;
    user-select: none;
}

.cta-btn {
    display: inline-block;
    margin: 2rem 0 0;
    padding: 0.9rem 2.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #112846;
    background: linear-gradient(90deg, #ffffff 0%, rgba(6, 165, 221, 1) 100%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 18px rgba(33,150,243,0.15);
    cursor: pointer;
    letter-spacing: 0.5px;
}

.cta-btn:hover, .cta-btn:focus {
    color: #ffffff;
    background: linear-gradient(90deg, #112846 0%, rgba(6, 165, 221, 1) 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(33,150,243,0.25);
    outline: none;
}

/* Responsive CTA button sizing */
/* Mobile responsive sizing for CTA button */
@media (max-width: 575px) {
    .cta-btn {
        padding: 0.7rem 1.8rem; /* Smaller padding for mobile */
        font-size: 1rem; /* Smaller font for mobile */
    }
}

/* Tablet responsive sizing for CTA button */
@media (min-width: 576px) and (max-width: 991px) {
    .cta-btn {
        padding: 0.8rem 2rem; /* Slightly smaller padding for tablet */
        font-size: 1.1rem; /* Slightly smaller font for tablet */
    }
}