/* ========== PROJECT PAGE STYLES ========== */

/* Hero Section */
.project-hero {
    background: #061a46;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    padding: 96px 0;
}

.project-hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("../images/projects/hero-projects.png");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;

  opacity: 1; /* сначала поставь 1 чтобы проверить, потом уменьши */
  pointer-events: none;
  z-index: 0;
}

.project-hero__content {
  position: relative;
  z-index: 1;
}
.project-hero__content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0;
    text-align: left;
    color: #ffffff;
}

.project-hero__title {
    margin: 0 0 24px;
    color: #ffffff;
}

.project-hero__subtitle {
    margin: 0 0 32px;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 130%;
    color: rgba(255, 255, 255, 0.9);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.project-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 40px;
    border-radius: 12px;
    background: #1A83D4;
    color: rgba(248, 250, 252, 1);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}

.project-hero__btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.project-hero__btn:active {
    transform: translateY(0);
}

/* Projects Grid */
.project-grid {
    padding: 80px 0;
    background: #ffffff;
}

.project-grid .container {
    max-width: 1200px;
}

.project-grid__wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

@media (max-width: 1279px) {
    .project-hero {
        padding: 84px 0 72px;
    }

    .project-hero__content {
        max-width: 520px;
    }

    .project-grid__wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

.project-grid__card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(203, 213, 225, 1)
}

.project-grid__card:hover {
    transform: translateY(-4px);
}

.project-grid__card--hidden {
    display: none;
}

.project-grid__card--hidden.is-visible {
    display: flex;
}

.project-grid__image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
}

.project-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-grid__badge {
    display: inline-block;
    padding: 6px 12px;
    margin: 20px 20px 0;
    border-radius: 8px;
    border: 1px solid rgba(51, 65, 85, 1);
    background: #f9fafb;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 12px;
    color: rgba(51, 65, 85, 1);
    align-self: flex-start;
}

.project-grid__title {
    margin: 16px 20px 12px;
}

.project-grid__desc {
    margin: 0 20px 20px;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.5em * 3);
    flex-grow: 1;
}

.project-grid__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    margin: 0 20px 20px;
    margin-top: auto;
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 1);
    background: transparent;
    color: rgba(51, 65, 85, 1);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.12s ease, color 0.12s ease;
    align-self: flex-start;
}

.project-grid__btn:hover {
    background: rgba(51, 65, 85, 1);
    color: #ffffff;
}

/* Load More Button */
.project-grid__load-more {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.project-grid__load-btn {
    background: transparent;
    border: none;
    color: rgba(26, 131, 212, 1);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    padding: 8px 16px;
    line-height: 100%;
    transition: color 0.12s ease;
    border: 1px solid rgba(203, 213, 225, 1);
}

.project-grid__load-btn:hover {
    color: var(--primary-600);
}

.project-grid__load-btn:disabled {
    display: none;
}

/* Mobile Styles */
@media (max-width: 980px) {
    .project-hero {
        padding: 80px 0 60px;
    }

    .project-hero__subtitle {
        font-size: 18px;
    }

    .project-grid {
        padding: 48px 0;
    }

    .project-grid__wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-grid__image {
        height: 200px;
    }

}

@media (max-width: 640px) {
    .project-hero {
        padding: 60px 0 40px;
    }

    .project-hero__subtitle {
        font-size: 16px;
    }

    .project-grid {
        padding: 32px 0;
    }

    .project-grid__card {
        border-radius: 14px;
    }

    .project-grid__image {
        height: 180px;
    }

    .project-grid__badge {
        margin: 16px 16px 0;
        font-size: 14px;
    }

    .project-grid__title {
        margin: 12px 16px 8px;
        font-size: 18px;
    }

    .project-grid__desc {
        margin: 0 16px 16px;
        font-size: 13px;
    }

    .project-grid__btn {
        margin: 0 16px 16px;
        font-size: 13px;
    }

    .project-grid__btn {
        margin: 0 auto 16px;
        font-size: 13px;
        height: 40px;
        padding: 0 16px;
        border-radius: 12px;
        border: 1px #1A83D4;
        background: #1A83D4;
        color: rgba(248, 250, 252, 1);
        align-self: center;
    }

    .project-grid__btn:hover {
        background: #1A83D4;
        color: rgba(248, 250, 252, 1);
    }
}
