/* == PROJECTS.CSS == */

/* HEADER */
.projects-header {
    background: #eaf4fe;
    width: 96vw;
    min-width: 320px;
    min-height: 260px;
    margin: 0 auto 54px;
    padding: 80px 36px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 40px #3270a312, 0 1.5px 6px #1341800a;
}
.projects-header h1 {
    color: #133740;
    font-size: 2.7em;
    font-weight: 800;
    margin: 0 0 22px;
    letter-spacing: 0.01em;
}
.projects-header p {
    color: #133740;
    font-size: 1.29em;
    font-weight: 500;
    max-width: 1280px;
    margin: 0 auto;
}

/* GRID */
.projects-list {
    padding-bottom: 90px;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 54px;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 18px;
}

/* CARD */
.project-card {
    background: #eaf4fe;
    border-radius: 26px;
    box-shadow: 0 4px 36px #1569aa10, 0 1.5px 8px #1569aa0a;
    padding: 36px 24px 22px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background 0.14s, box-shadow 0.14s, transform 0.14s;
}
.project-card:hover {
    background: #d7eafd;
    box-shadow: 0 14px 38px #1569aa19, 0 4px 18px #1569aa14;
    transform: translateY(-3.5px) scale(1.022);
}
.project-title {
    margin: 0 0 10px;
    font-size: 1.09em;
    font-weight: 700;
    color: #133740;
}
.project-client {
    margin: 0 0 4px;
    font-size: 1.06em;
    font-weight: 700;
    color: #133740;
}
.project-period {
    margin: 0;
    font-size: 1em;
    color: #133740;
}

/* OVERLAY */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(30,60,75,0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.overlay.open { display: flex; }
.overlay-content {
    position: relative;
    background: #fff;
    border-radius: 13px;
    padding: 36px 52px 30px;
    max-width: 480px;
    width: 98vw;
    box-shadow: 0 6px 32px rgba(21,120,183,0.21);
    animation: fadeInOverlay 0.2s ease-out;
}
@keyframes fadeInOverlay {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 2em;
    color: #133740;
    cursor: pointer;
    transition: color 0.16s;
    background: none;
    border: none;
}
.close-btn:hover { color: #ef3b55; }
.overlay-info h2 {
    margin-top: 0;
    font-size: 1.4em;
    color: #133740;
}
.overlay-client,
.overlay-period {
    margin: 6px 0;
    font-size: 1.06em;
    color: #133740;
}
.overlay-desc {
    margin-top: 18px;
    font-size: 1em;
    color: #133740;
    line-height: 1.6;
}

/* АДАПТИВ */
@media (max-width: 1250px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 950px) {
    .projects-header {
        padding: 34px 2vw 19px;
        min-height: 150px;
    }
    .projects-header h1 { font-size: 1.9em; }
    .projects-header p  { font-size: 1em; }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px 0;
    }
    .project-card {
        padding: 22px 14px 16px;
        min-height: 120px;
    }
    .overlay-content {
        padding: 18px 14px 14px;
        max-width: 99vw;
        font-size: 0.99em;
    }
    .close-btn {
        top: 8px; right: 8px;
        font-size: 1.4em;
    }
}
@media (max-width: 700px) {
    .projects-header {
        padding: 45px 2vw 24px !important;
        min-height: 120px !important;
        margin-bottom: 23px !important;
    }
    .projects-header h1 { font-size: 1.13em !important; }
    .projects-header p  { font-size: 0.92em !important; }
}
@media (max-width: 600px) {
    .project-title,
    .project-client,
    .project-period,
    .overlay-info h2 {
        font-size: 1em;
    }
}
@media (max-width: 900px) {
    .projects-header {
        padding-top: 88px !important;
    }
}
@media (max-width: 700px) {
    .projects-header {
        padding-top: 78px !important;
    }
}
