/* Featured Projects block (axisworld/featured-projects, inc/projects.php).
   Loaded on the site and in the editor, so it can't live in css/style.css.
   Sizes are px: bootstrap.min.css sets html { font-size: 62.5% }. The eyebrow
   and "All projects" link reuse .aw-eyebrow / .aw-arrow-link from css/style.css. */

.aw-projects {
    width: 100vw;
    max-width: none;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 96px 0;
    background-color: #fdfbf7;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
    color: #1e1711;
}

.aw-projects .aw-projects__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header: eyebrow + heading, "All projects" link */
.aw-projects .aw-projects__header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.aw-projects .aw-projects__header p {
    margin: 0;
}

.aw-projects .aw-projects__title {
    margin: 20px 0 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    line-height: 36px;
    font-weight: 800;
    letter-spacing: -.025em;
    text-transform: none;
    color: #5e3f23;
}

/* Grid: large card (8 cols), two stacked (4 cols), the rest 4 cols each */
.aw-projects .aw-projects__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.aw-projects .aw-projects__stack {
    display: grid;
    gap: 24px;
}

/* Card */
.aw-project-card {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    text-decoration: none;
    color: #fdfbf7;
    background-color: #e6dfc5;
}

.aw-project-card:hover,
.aw-project-card:focus {
    text-decoration: none;
    color: #fdfbf7;
}

.aw-projects__lead .aw-project-card {
    height: 340px;
}

.aw-projects__stack .aw-project-card {
    height: 240px;
}

.aw-project-card .aw-project-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    transition: transform .9s cubic-bezier(.4, 0, .2, 1);
}

.aw-project-card:hover .aw-project-card__img {
    transform: scale(1.05);
}

.aw-project-card__shade {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(24, 18, 12, .8), rgba(24, 18, 12, .1), rgba(24, 18, 12, 0));
}

.aw-project-card__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background-color: #c47723;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #fdfbf7;
}

.aw-project-card__body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 24px;
}

.aw-project-card__text,
.aw-project-card__meta,
.aw-project-card__name {
    display: block;
}

.aw-project-card__meta {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #d4882b;
}

.aw-project-card__name {
    margin-top: 6px;
    font-size: 24px;
    line-height: 32px;
    font-weight: 800;
    color: #fdfbf7;
}

/* Large card */
.aw-project-card--lead .aw-project-card__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 28px;
}

.aw-project-card--lead .aw-project-card__meta {
    font-size: 11px;
}

.aw-project-card--lead .aw-project-card__name {
    margin-top: 8px;
    font-size: 30px;
    line-height: 36px;
}

/* Arrow box (lucide arrow-up-right) */
.aw-project-card__arrow {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #fdfbf7;
    color: #5e3f23;
    transition: background-color .15s cubic-bezier(.4, 0, .2, 1), color .15s cubic-bezier(.4, 0, .2, 1);
}

.aw-project-card__arrow::before {
    content: "";
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.aw-project-card:hover .aw-project-card__arrow {
    background-color: #c47723;
    color: #fdfbf7;
}

@media (min-width: 640px) {
    .aw-projects .aw-projects__inner {
        padding: 0 32px;
    }

    .aw-projects .aw-projects__title {
        font-size: 36px;
        line-height: 40px;
    }

    .aw-projects__lead .aw-project-card {
        height: 440px;
    }

    .aw-projects__stack .aw-project-card {
        height: 262px;
    }

    .aw-project-card--lead .aw-project-card__body {
        padding: 36px;
    }

    .aw-project-card--lead .aw-project-card__name {
        font-size: 36px;
        line-height: 40px;
    }

    .aw-project-card__arrow {
        display: inline-flex;
    }
}

@media (min-width: 1024px) {
    .aw-projects {
        padding: 128px 0;
    }

    .aw-projects .aw-projects__inner {
        padding: 0 48px;
    }

    .aw-projects .aw-projects__header {
        flex-direction: row;
        align-items: flex-end;
    }

    .aw-projects .aw-projects__title {
        font-size: 48px;
        line-height: 1;
    }

    .aw-projects .aw-projects__grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .aw-projects .aw-projects__lead {
        grid-column: span 8 / span 8;
    }

    .aw-projects .aw-projects__stack,
    .aw-projects .aw-projects__cell {
        grid-column: span 4 / span 4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aw-project-card .aw-project-card__img,
    .aw-project-card__arrow {
        transition: none;
    }
}

/* Editor preview: no full-bleed, no default block width/margins */
.editor-styles-wrapper .wp-block[data-type="axisworld/featured-projects"] {
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
}

.editor-styles-wrapper .aw-projects {
    width: auto;
    margin: 0;
}
