/* ==========================================================================
   Due Projects – Split Card Grid
   Brand: #054371 | Font: Montserrat (loaded by theme)
   Prefix: .due-
   
   DEFAULT  → Image fills ~80%, bottom strip shows title + arrow
   HOVER    → Image shrinks to ~35%, content expands with tag/title/location/excerpt/arrow
   ========================================================================== */

/* ---------- Grid ---------- */
.due-projects-grid {
    display: grid !important;
    gap: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

.due-projects-grid.due-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.due-projects-grid.due-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.due-projects-grid.due-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* ---------- Card ---------- */
.due-project-card {
    position: relative !important;
    /* border-radius: 14px !important; */
    overflow: hidden !important;
    background: #082d4f !important;
    height: 420px !important;
}

/* ---------- Link wrapper (fills entire card) ---------- */
.due-project-card__link {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.due-project-card__link:hover,
.due-project-card__link:focus,
.due-project-card__link:visited {
    text-decoration: none !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ---------- Image area (fills entire card as background) ---------- */
.due-project-card__image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 1 !important;
}

.due-project-card__image--placeholder {
    background: linear-gradient(135deg, #054371 0%, #0b2a45 100%) !important;
}

/* ---------- Content area (overlays image from bottom) ---------- */
.due-project-card__content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 16px 20px !important;
    background: rgba(8, 45, 79, 0.85) !important;
    z-index: 2 !important;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

/* ---------- Details (hidden by default) ---------- */
.due-project-card__details {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease 0.05s !important;
}

/* ---------- Footer (always visible) ---------- */
.due-project-card__footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

/* Show title in footer by default via pseudo — but we have title in details.
   Instead, let's use a simpler approach: show title always, hide extras */

/* ---------- Tags ---------- */
.due-project-card__tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

.due-project-card__tag {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #6fbfff !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

/* ---------- Title ---------- */
.due-project-card__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* ---------- Location ---------- */
.due-project-card__location {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

/* ---------- Excerpt ---------- */
.due-project-card__excerpt {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
}

/* ---------- Arrow ---------- */
.due-project-card__arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    color: #ffffff !important;
    background: transparent !important;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease !important;
    padding: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
}

.due-project-card__arrow svg {
    width: 15px !important;
    height: 15px !important;
    display: block !important;
}

.due-project-card:hover .due-project-card__arrow {
    background: transparent !important;
    border: none !important;
    transform: translateX(3px) !important;
}

/* ========================================================================
   HOVER STATE — expand content, shrink image
   ======================================================================== */

.due-project-card:hover .due-project-card__content {
    padding: 20px 20px !important;
}

.due-project-card:hover .due-project-card__details {
    max-height: 300px !important;
    opacity: 1 !important;
}

/* ========================================================================
   DEFAULT — title visible via footer
   We need the title to show in the footer by default.
   We'll use a data attribute approach: duplicate with CSS.
   Actually simpler: keep title always visible by moving it outside details.
   BUT the title is in details for the hover expand…
   
   SOLUTION: Use the card title attribute approach — 
   Show title in footer area on default via ::before pseudo on footer
   
   Actually best: restructure so title is OUTSIDE details, always visible.
   We can't change PHP here, so let's use CSS to show title from details 
   even when details is collapsed.
   
   ALTERNATIVE: Make details partially visible — show only title height,
   hide the rest.
   ======================================================================== */

/* Override: details shows title by default (first few lines) */
.due-project-card__details {
    max-height: 26px !important;
    opacity: 1 !important;
}

/* Hide tags, location, excerpt by default */
.due-project-card__tags,
.due-project-card__location,
.due-project-card__excerpt {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

/* On hover show everything */
.due-project-card:hover .due-project-card__tags,
.due-project-card:hover .due-project-card__location,
.due-project-card:hover .due-project-card__excerpt {
    opacity: 1 !important;
}

.due-project-card:hover .due-project-card__details {
    max-height: 400px !important;
    opacity: 1 !important;
}

/* ---------- No projects fallback ---------- */
.due-no-projects {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    color: #054371 !important;
    text-align: center !important;
    padding: 40px 20px !important;
}

/* ========================================================================
   Responsive
   ======================================================================== */

@media (max-width: 1024px) {
    .due-projects-grid.due-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .due-projects-grid.due-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .due-project-card {
        height: 380px !important;
    }
}

@media (max-width: 768px) {

    .due-projects-grid.due-cols-2,
    .due-projects-grid.due-cols-3,
    .due-projects-grid.due-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .due-project-card {
        height: 360px !important;
    }

    .due-project-card__content {
        padding: 14px 16px !important;
    }

    .due-project-card__title {
        font-size: 16px !important;
    }

    .due-project-card__excerpt {
        font-size: 12.5px !important;
    }
}

@media (max-width: 480px) {
    .due-projects-grid {
        gap: 16px !important;
    }

    .due-project-card {
        height: 320px !important;
        /* border-radius: 10px !important; */
    }

    .due-project-card__content {
        padding: 12px 14px !important;
    }
}

/* ==========================================================================
   SINGLE PROJECT PAGE
   ========================================================================== */

/* ---------- Hero ---------- */
.due-single-hero {
    position: relative !important;
    width: 100% !important;
    min-height: 520px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #054371 !important;
    display: flex !important;
    align-items: flex-end !important;
}

.due-single-hero__overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(
        0deg,
        rgba(5, 67, 113, 0.95) 0%,
        rgba(5, 67, 113, 0.4) 50%,
        rgba(5, 67, 113, 0.1) 100%
    ) !important;
    display: flex !important;
    align-items: flex-end !important;
}

.due-single-hero__inner {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 60px 40px !important;
    position: relative !important;
    z-index: 2 !important;
}

/* ---------- Hero Tags ---------- */
.due-single-hero__tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 0 16px 0 !important;
}

.due-single-hero__tag {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #6fbfff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 6px 16px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
}

/* ---------- Hero Title ---------- */
.due-single-hero__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 44px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    color: #ffffff !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: -0.5px !important;
}

/* ---------- Hero Location ---------- */
.due-single-hero__location {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.due-single-hero__location svg {
    color: #6fbfff !important;
    flex-shrink: 0 !important;
}

/* ---------- Content ---------- */
.due-single-content {
    width: 100% !important;
    background: #ffffff !important;
}

.due-single-content__inner {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 60px 40px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #1a3a52 !important;
}

.due-single-content__inner h2,
.due-single-content__inner h3,
.due-single-content__inner h4 {
    font-family: 'Montserrat', sans-serif !important;
    color: #054371 !important;
    margin-top: 2em !important;
    margin-bottom: 0.6em !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.due-single-content__inner h2 {
    font-size: 28px !important;
}

.due-single-content__inner h3 {
    font-size: 22px !important;
}

.due-single-content__inner p {
    margin: 0 0 1.4em 0 !important;
}

.due-single-content__inner img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 1.5em 0 !important;
}

.due-single-content__inner ul,
.due-single-content__inner ol {
    padding-left: 1.5em !important;
    margin: 0 0 1.4em 0 !important;
}

.due-single-content__inner li {
    margin-bottom: 0.5em !important;
}

.due-single-content__inner blockquote {
    border-left: 4px solid #054371 !important;
    margin: 1.5em 0 !important;
    padding: 16px 24px !important;
    background: rgba(5, 67, 113, 0.04) !important;
    font-style: italic !important;
    color: #054371 !important;
}

/* ---------- Single Page Responsive ---------- */
@media (max-width: 768px) {
    .due-single-hero {
        min-height: 380px !important;
    }

    .due-single-hero__inner {
        padding: 40px 24px !important;
    }

    .due-single-hero__title {
        font-size: 30px !important;
    }

    .due-single-hero__location {
        font-size: 14px !important;
    }

    .due-single-content__inner {
        padding: 40px 24px !important;
        font-size: 15px !important;
    }

    .due-single-content__inner h2 {
        font-size: 24px !important;
    }

    .due-single-content__inner h3 {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .due-single-hero {
        min-height: 300px !important;
    }

    .due-single-hero__inner {
        padding: 30px 16px !important;
    }

    .due-single-hero__title {
        font-size: 24px !important;
    }

    .due-single-content__inner {
        padding: 30px 16px !important;
    }
}