/* projects css */

.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(19, 53, 82, 0.4) 0%, rgba(11, 15, 27, 0.6) 100%);
    border: 1px solid rgba(83, 195, 255, 0.2);
    border-radius: 16px;
    margin-bottom: 40px;
}

/* Hero adjustments: larger title, smaller overall container, centered description */
.hero-section {
    max-width: 880px;
    margin: 0 auto 20px;
    text-align: center;
}

.hero-section .highlight-title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: clamp(0px, 1vw, 1px);
}

.hero-section p {
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    max-width: 720px;
}

.project-page-header {
    text-align: center;
    padding: 20px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.project-main-title {
    font-family: 'WMCT_One', sans-serif;
    font-size: clamp(3rem, 10vw, 5.5rem);
    color: #ffea63;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(255, 234, 99, 0.18);
    text-transform: uppercase;
}

.projects-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1300px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    justify-self: center;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #53c3ff;
    background: rgba(255, 255, 255, 0.05);
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.5s ease;
    display: block;
}

.project-card:hover .card-img {
    opacity: 1;
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: "WMCT_One", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.card-description {
    font-family: "Blogger", sans-serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-top: auto;
    margin-bottom: 12px;
    overflow: hidden;
}

.card-btns {
    margin-top: 0;
    display: flex;
    gap: 10px;
}

.btn-link {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-family: "Blogger", sans-serif;
    background: rgba(83, 195, 255, 0.1);
    border: 1px solid rgba(83, 195, 255, 0.2);
    color: #53c3ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: 0.2s;
    cursor: pointer;
}

.btn-link:hover {
    background: #53c3ff;
    color: #0b141d;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #081018;
    border: 1px solid #1a3a5a;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.modal-inner-padding {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #4da6ff;
    font-size: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.modal-graphic-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 0 20px 0;
    background: radial-gradient(circle at center, rgba(83, 195, 255, 0.1) 0%, transparent 70%);
    flex-shrink: 0;
}

.modal-banner {
    width: 60%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(83, 195, 255, 0.2));
    border-radius: 5px;
}

.modal-title {
    font-family: "WMCT_One", sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 10px 0 5px 0;
}

.modal-subtitle {
    font-family: "Blogger", sans-serif;
    font-size: 0.9rem;
    color: #94a3b8;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.modal-action-btn {
    background: #162431;
    border: 1px solid #233549;
    color: #4da6ff;
    padding: 12px 30px;
    border-radius: 6px;
    font-family: "Blogger", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
}

.modal-action-btn:hover {
    background: #1c2e3f;
    border-color: #4da6ff;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 480px) {
    .main-container {
        padding: 16px 12px;
    }

    .projects-container {
        padding: 20px 12px;
    }
}

@media (max-width: 900px) {
    .main-container {
        margin-left: 12px;
        margin-right: 12px;
        padding: 20px 16px;
        box-sizing: border-box;
    }

    .projects-container {
        padding: 40px 20px;
    }

    .projects-grid {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    .project-card {
        max-width: 100%;
    }

    .modal-content {
        width: 100%;
        max-height: 85vh;
    }

    .modal-graphic-container {
        padding: 30px 0 10px 0;
    }

    .modal-banner {
        max-width: 150px;
    }

    .modal-inner-padding {
        padding: 20px;
    }

    /* no fixed min-height; description is anchored to bottom */
}