/* css/project-modals.css - Project detail modal pop-out styles */

/* ===== Modal Overlay ===== */
.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.project-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease;
}

/* ===== Backdrop ===== */
.project-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ===== Modal Container ===== */
.project-modal {
    position: relative;
    background: linear-gradient(180deg,
            rgba(15, 25, 45, 0.97) 0%,
            rgba(10, 20, 35, 0.98) 100%);
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 1.25rem;
    max-width: 700px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 170, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-modal-overlay.active .project-modal {
    transform: translateY(0) scale(1);
}

/* Custom scrollbar for modal */
.project-modal::-webkit-scrollbar {
    width: 6px;
}

.project-modal::-webkit-scrollbar-track {
    background: transparent;
}

.project-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 170, 255, 0.3);
    border-radius: 3px;
}

/* ===== Close Button ===== */
.project-modal-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 10;
    width: 40px;
    height: 40px;
    margin: 1rem 1rem 0 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.project-modal-close:hover {
    background: rgba(255, 80, 80, 0.25);
    border-color: rgba(255, 80, 80, 0.4);
    color: #fff;
    transform: rotate(90deg);
}

.project-modal-close:focus {
    outline: 2px solid rgba(0, 170, 255, 0.6);
    outline-offset: 2px;
}

/* ===== Modal Body ===== */
.project-modal-body {
    clear: both;
}

/* ===== Header Image ===== */
.modal-header-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 0 0 0 0;
    /* top corners handled by parent */
}

.modal-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 170, 255, 0.15);
}

/* Gradient overlay on image */
.modal-header-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top,
            rgba(15, 25, 45, 0.95) 0%,
            transparent 100%);
    pointer-events: none;
}

/* ===== Content Body ===== */
.modal-content-body {
    padding: 1.5rem 2rem 2rem;
}

/* ===== Date Badge ===== */
.modal-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #00d4ff;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.2rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 2rem;
    margin-bottom: 0.75rem;
}

/* ===== Course Badge ===== */
.modal-course {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.modal-course i {
    margin-right: 0.35rem;
    color: rgba(0, 212, 255, 0.6);
}

/* ===== Screenshots ===== */
.modal-screenshots {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 170, 255, 0.1);
}

.modal-screenshot {
    width: 100%;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-screenshot:last-child {
    margin-bottom: 0;
}

/* ===== Title ===== */
.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Objective ===== */
.modal-objective {
    font-size: 1rem;
    color: #a8c4d8;
    line-height: 1.6;
    padding: 1rem 1.25rem;
    background: rgba(0, 170, 255, 0.06);
    border-left: 3px solid rgba(0, 170, 255, 0.4);
    border-radius: 0 0.5rem 0.5rem 0;
    margin-bottom: 1.5rem;
}

.modal-objective strong {
    color: #7dd3fc;
}

/* ===== Tools Section ===== */
.modal-tools {
    margin-bottom: 1.5rem;
}

.modal-tools h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.modal-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tool-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 170, 255, 0.12);
    border: 1px solid rgba(0, 170, 255, 0.25);
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #7dd3fc;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-tool-tag:hover {
    background: rgba(0, 170, 255, 0.2);
    border-color: rgba(0, 170, 255, 0.4);
}

/* ===== Description ===== */
.modal-description {
    margin-bottom: 1.5rem;
}

.modal-description p {
    color: #c5d5e5;
    line-height: 1.75;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal-description p:last-child {
    margin-bottom: 0;
}

/* ===== External Link ===== */
.modal-external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.2), rgba(0, 119, 182, 0.3));
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 0.5rem;
    color: #7dd3fc;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.modal-external-link:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.3), rgba(0, 119, 182, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.2);
    color: #fff;
}

.modal-external-link i {
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .project-modal {
        width: 96%;
        max-height: 90vh;
        border-radius: 1rem;
    }

    .modal-header-image {
        height: 160px;
    }

    .modal-content-body {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .modal-objective {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .project-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}
