/* Project Section - Equal Image Height */
.project-image-2 {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

/* Project Image */
.project-image-2 {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 520px; /* Card height */
}

.project-image-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* Fully covers the container */
    object-position: center; /* Keeps the image centered */
    display: block;
    transition: transform 0.4s ease;
}

/* Optional hover effect */
.project-image-2:hover img {
    transform: scale(1.08);
}

/* Tablet */
@media (max-width: 991px) {
    .project-image-2 {
        height: 350px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .project-image-2 {
        height: 430px;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .project-image-2 img {
        height: 550px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .project-image-2 img {
        height: 280px;
    }
}




/* Tablet only */
@media (min-width: 768px) and (max-width: 991px) {

    .project-section-inner .row{
        display: flex;
        flex-wrap: wrap;
    }

    .project-section-inner .col-md-6:last-child{
        flex: 0 0 50%;
        max-width: 50%;
        margin-left: 25%;
    }
}
@media (min-width: 992px) and (max-width: 1024px) {

    .project-section-inner .row {
        justify-content: center;
    }

    .project-section-inner .col-lg-6:last-child {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .project-image-2 .project-content h6 {
        font-size: 13px;
    }

    .project-image-2 .project-content h3 {
        font-size: 19px;
    }
}


/* Desktop */
@media (min-width: 992px) {

    .project-section .row {
        justify-content: center;
    }

    .project-section .row > .col-lg-6:last-child {
        margin-left: auto;
        margin-right: auto;
    }
}


/* ===============================
   Projects Section Responsive
================================= */

/* Desktop */
@media (min-width: 992px){

    .project-section .row{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .project-section .row > .col-lg-6{
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Last Card Center */
    .project-section .row > .col-lg-6:last-child{
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablet */
@media (max-width: 991px){

    .project-section .row{
        justify-content: center;
    }

    .project-section .col-lg-6{
        width: 100%;
        max-width: 100%;
        margin-bottom: 25px;
    }

    .project-items{
        max-width: 650px;
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 767px){

    .project-section{
        padding: 70px 0;
    }

    .project-section .section-title{
        margin-bottom: 35px;
    }

  

    .project-section .project-image img{
        width: 100%;
        height: auto;
        display: block;
    }

    .project-items{
        margin-bottom: 20px;
    }

    .project-content{
        padding: 20px;
    }

 

    .project-content h6{
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 575px){

    .project-section{
        padding: 60px 0;
    }

 

    .project-content{
        padding: 18px;
    }

    .project-content h3{
        font-size: 18px;
    }
}


.project-card{
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 2px solid #e7e7e7;
    border-radius: 10px;
    /* min-height rather than a fixed height: the card grows with its copy so
       the arrow never collides with the bottom edge; height:100% keeps the
       three cards in a row equal (the .row stretches its columns). */
    height: 100%;
    min-height: 460px;
    transition: .5s;
    cursor: pointer; /* whole card is a link — see .project-link */
}

.project-bg{
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.project-bg img{
    width: 100%;
    height: 100%;
    object-fit: cover;

    transform: translateY(-100%);
    transition: .6s ease;
}

.project-bg::after{
    content: "";
    position: absolute;
    inset: 0;
  background: rgba(0, 0, 0, 0.436);   /* lighter overlay */
    opacity: 0;
    transition: .6s;
}

.project-card:hover .project-bg img{
    transform: translateY(0);
}

.project-card:hover .project-bg::after{
    opacity: 1;
}

.project-body{

    position:relative;
    z-index:2;
    padding:40px 30px 32px;
    height:100%;

    display:flex;
    flex-direction:column;
}

.project-title{

    background:#204066;
    color:#fff;
    padding:16px 28px;
    font-size:24px;
    font-weight:700;

    border-radius:0 40px 40px 0;

    width:calc(100% + 30px);
    margin-left:-30px;
    margin-bottom:35px;
}

.project-body p{

    color:#666;
    font-size:18px;
    line-height:1.8;
}

.project-footer{
    /* auto pushes the arrow row to the card bottom; padding-top keeps a
       minimum gap from the copy when the card is at its shortest */
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    /* the icon moved above the title, so only the arrow is left here */
    justify-content: flex-end;
    align-items: center;
}

/* was .project-footer .icon — broadened now that the icon sits at the top
   of the card, above the title */
.project-card .icon{
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f5f3f7;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 28px;
    color: #00984a;
    transition: .4s;

    /* keep the circle from stretching in the flex-column body */
    flex: 0 0 auto;
    align-self: flex-start;
    margin-bottom: 24px;
}

.project-footer a{

   width: 45px;
    height: 45px;
    font-size: 18px;
    border-radius:50%;
    background:#204066; /* site blue (--theme-color-2) */

    display:flex;
    justify-content:center;
    align-items:center;

    color:#fff;

    /* visible at rest — it used to be opacity:0 / translateX(20px), which both
       hid it until hover and pushed it under the card's overflow:hidden edge */
    opacity:1;
    transform:none;
    flex:0 0 auto;

    transition:.5s;

    /* deliberately NOT position:relative — the ::after below must resolve
       against .project-body (which fills the card), not against this 45px
       button. z-index still applies here because it's a flex item. */
    z-index:4;
}

/* Whole card clickable.
   A pseudo-element on the arrow link resolved against .project-body, which
   builds its own stacking context (position:relative + z-index:2) — so it
   never reliably sat on top. This is an explicit transparent anchor that is a
   direct child of .project-card, so inset:0 covers the entire card and its
   z-index competes at the card level, above .project-body. */
.project-link{
    position:absolute;
    inset:0;
    z-index:5;
    display:block;
    /* no visual footprint — the card itself is the affordance */
    background:transparent;
    text-indent:-9999px;
    overflow:hidden;
}

/* Hover */

.project-card:hover .project-bg{

    opacity:1;
}

.project-card:hover p{

    color:#fff;
}

.project-card:hover .icon{

    background:#45d5d4;
    color:#fff;
}

.project-card:hover .project-footer a{

    opacity:1;
    transform:translateX(0);
}

.project-card:hover{

    transform:translateY(-8px);
    box-shadow:0 20px 50px rgba(0,0,0,.2);
}


/* Icon Hover */
.project-card:hover .icon{
    background: #00984a;
    color: #fff;
    transition: .4s ease;
}

/* Arrow Hover */
.project-card:hover .project-footer a{
    background: #00984a;
    color: #fff;
    opacity: 1;
    transform: translateX(0);
}

/*============================================================================
  Client logo wall  (project.html)

  The brand identities we designed for the centres we built. The logos sit
  directly on the section - no card, no holder, no caption. Namespaced
  .client-wall* because main.css already owns .client-item / .client-image /
  .client-info.
============================================================================*/

/* White, not tinted: most of these logos are JPEGs with their own white
   background baked in, so a tinted section would frame each one in a pale
   rectangle now that there is no holder to hide it. */
.client-wall-section {
    background-color: #fff;
}

.client-wall-intro {
    max-width: 760px;
    margin: 18px auto 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.75;
}

/* Flex rather than grid, so a short final row centres itself under the one
   above instead of hanging off to the left - the count of logos will not
   always divide evenly by the columns. --cols/--gap drive the item width,
   so the breakpoints below only need to change those two numbers. */
.client-wall {
    --cols: 5;
    --gap: 30px;
    --row-gap: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: var(--gap);
    row-gap: var(--row-gap);
    margin-top: 46px;
}

/* Padding is in px, not %: percentage padding on a flex item resolves
   against the whole row's width, not the item's, so a % here would inset
   every logo about five times too far. */
.client-wall__item {
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
    max-width: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 22px;
    transition: transform 0.3s ease;
}

.client-wall__item:hover {
    transform: scale(1.06);
}

/* Per-logo optical sizing. The Dr. Sridevi lockup is a wide, short strip
   that reads undersized at the padding the other logos share, so it gets
   a tighter inset. */
.client-wall__item--lg {
    padding: 4px;
}

.client-wall__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* max-width/max-height rather than a stretched width, so every logo keeps
   its own aspect ratio and the small ones - the Affiniti wordmark is only
   395px wide - are never upscaled into a blur. */
.client-wall__logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 1199px) {
    .client-wall {
        --cols: 4;
        --gap: 26px;
    }
}

@media (max-width: 991px) {
    .client-wall {
        --cols: 3;
        margin-top: 36px;
    }
}

@media (max-width: 575px) {
    .client-wall {
        --cols: 2;
        --gap: 18px;
        --row-gap: 0;
    }

    .client-wall__item {
        padding: 14px;
    }
}

/*-----------------------[ Project grid: one card per centre ]----------------
   Filter buttons + a responsive card grid (photo, type tag, name, city).
   Cards hidden by the filter use the [hidden] attribute.
----------------------------------------------------------------------------*/

.pg-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 40px;
}

.pg-filter {
    border: 1px solid rgba(32, 64, 102, 0.2);
    background: var(--white);
    color: var(--theme-color-2);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.pg-filter:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
}

.pg-filter.is-active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: var(--white);
}

.pg-filter:focus-visible {
    outline: 2px solid var(--theme-color-2);
    outline-offset: 2px;
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.pg-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(32, 64, 102, 0.08);
    transition: transform .3s ease, box-shadow .3s ease;
}

.pg-card[hidden] {
    display: none;
}

.pg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(32, 64, 102, 0.16);
}

.pg-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg);
}

.pg-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.pg-card:hover .pg-media img {
    transform: scale(1.05);
}

/* Logo-only centres: show the whole mark on a light panel */
.pg-media--logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.pg-media--logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pg-body {
    padding: 18px 20px 22px;
}

.pg-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--theme-color);
    background: rgba(0, 152, 74, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
}

.pg-body h3 {
    margin: 10px 0 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--header);
}

.pg-city {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text);
}

.pg-city i {
    color: var(--theme-color);
    margin-right: 4px;
}

@media (max-width: 1199px) {
    .pg-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .pg-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .pg-filters { margin-bottom: 30px; }
}

@media (max-width: 575px) {
    .pg-grid { grid-template-columns: 1fr; }
    .pg-filter { padding: 10px 16px; font-size: 14px; }
}
/* Case-study link on a project card. Only the centres with a written-up
   case study carry one, so it sits under the name rather than wrapping
   the whole card. */
.pg-case-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color-2);
    transition: color .3s ease;
}

.pg-case-link i {
    font-size: 12px;
    transition: transform .3s ease;
}

.pg-case-link:hover {
    color: var(--theme-color);
}

.pg-case-link:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   CASE STUDIES — tall photo cards with the copy over the image.
   Three portrait cards, each a full-bleed photo with a dark gradient at the
   foot carrying the name, city, story line, the two headline numbers and the
   link. The whole card is clickable via a stretched overlay anchor, so the
   visible "Read the case study" text stays a span (no nested links).
   ========================================================================== */

.pg-cases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.pg-case {
    position: relative;
    display: flex;
    align-items: flex-end;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    background: #0d1f33;
    box-shadow: 0 18px 46px rgba(13, 31, 51, .20);
    transition: transform .35s ease, box-shadow .35s ease;
}

.pg-case:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(13, 31, 51, .30);
}

/* Stretched anchor makes the whole card clickable. */
.pg-case-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    text-indent: -9999px;
    overflow: hidden;
}

.pg-case-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
    transition: transform .6s ease;
}

.pg-case:hover .pg-case-img {
    transform: scale(1.06);
}

/* Scrim: light at the top so the photo reads, solid at the foot so the
   white copy stays legible over any image. */
.pg-case::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
        rgba(13, 31, 51, .15) 0%,
        rgba(13, 31, 51, .45) 34%,
        rgba(13, 31, 51, .88) 58%,
        rgba(13, 31, 51, .97) 100%);
}

.pg-case-no {
    position: absolute;
    top: 20px;
    /* 24px, not 22px: lines up with .pg-case-body padding so the number sits
       on the same left edge as the type badge and heading below it. */
    left: 24px;
    z-index: 3;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .14em;
    color: rgba(255, 255, 255, .75);
}

/* Copy sitting over the photo ------------------------------------------ */

.pg-case-body {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 26px 24px 24px;
}

.pg-case-type {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(0, 152, 74, .92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.pg-case-body h3 {
    margin: 0 0 6px;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
}

.pg-case-city {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
}

.pg-case-city i { color: #7ee0a8; font-size: 12px; }

.pg-case-line {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .88);
}

/* The two numbers, as translucent tiles on the photo. */
.pg-case-stats {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
}

.pg-case-stats > div {
    flex: 1 1 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
}

.pg-case-stats dt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #7ee0a8;
    margin-bottom: 3px;
}

.pg-case-stats dd {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.pg-case-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    transition: color .3s ease;
}

.pg-case-cta i {
    font-size: 11px;
    transition: transform .3s ease;
}

.pg-case:hover .pg-case-cta { color: #7ee0a8; }
.pg-case:hover .pg-case-cta i { transform: translateX(4px); }


/* Responsive ----------------------------------------------------------- */

@media (max-width: 1199px) {
    .pg-cases { gap: 22px; }
    .pg-case-body { padding: 22px 20px 20px; }
    /* Stack the number above the body from here down rather than overlaying
       it. In three narrow columns the copy can be as tall as the card, and
       an absolutely-positioned number then collides with the type badge.
       In normal flow that cannot happen at any width or copy length. */
    .pg-case {
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
    }

    .pg-case-no {
        position: static;
        z-index: 2;
        padding: 22px 20px 10px;
    }
    .pg-case-body h3 { font-size: 21px; }
    .pg-case-line { font-size: 13px; }
}

@media (max-width: 991px) {
    .pg-cases { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    /* Third card alone on its row: hold the two-up width and centre it. */
    .pg-cases > .pg-case:last-child {
        grid-column: 1 / -1;
        max-width: calc(50% - 11px);
        justify-self: center;
    }
}

@media (max-width: 575px) {
    .pg-cases { grid-template-columns: 1fr; }
    .pg-cases > .pg-case:last-child { max-width: 100%; }
    /* A 3:4 card is very tall on a phone - square it off. min-height, not a
       fixed aspect-ratio: on a 320px screen the copy is taller than 4:5
       allows, and the body then overflowed the top of the card and pushed
       the type badge onto the 01/02/03 number. Letting the card grow keeps
       the proportion on roomier phones and prevents the collision on small
       ones. */
    .pg-case {
        aspect-ratio: auto;
        min-height: min(125vw, 460px);
    }

    /* The number is absolutely positioned at top:20px on bigger screens,
       where the copy never reaches that high. On a 320px screen the body is
       nearly as tall as the card, so its first child - the type badge - met
       the number and sat on top of it. Growing the card does not help: both
       move together. Putting the number back into normal flow above the body
       makes the collision impossible at any width or copy length. */
    .pg-case-no {
        position: static;
        z-index: 2;
        /* Sides match .pg-case-body padding exactly (20px) so the number and
           the type badge under it share one left edge - at 24px it sat 4px
           proud of everything below. The top keeps the number off the card
           edge when the copy is tall enough to fill the card. */
        padding: 22px 20px 10px;
    }

    .pg-case-body h3 { font-size: 22px; }
}


/* ==========================================================================
   WALKTHROUGH VIDEO — one of the centres, on opening day.
   The frame is locked to 16:9 and the clip fitted inside it. Without that a
   portrait clip renders at its own aspect once it replaces the poster — this
   one is 432x864, which at full width came out roughly three times too tall.
   ========================================================================== */

.pg-video-intro {
    max-width: 680px;
    margin: 0 auto;
}

.pg-video {
    position: relative;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    margin: 38px auto 0;
    border-radius: 18px;
    overflow: hidden;
    background-color: #0d1f33;
    box-shadow: 0 18px 46px rgba(13, 31, 51, 0.20);
}

.pg-video-play {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
}

.pg-video-play img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pg-video-play::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(13, 31, 51, 0.28);
    transition: background-color 0.3s ease;
}

.pg-video-play:hover::after {
    background-color: rgba(13, 31, 51, 0.16);
}

.pg-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background-color: var(--theme-color);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 0 0 10px rgba(0, 152, 74, 0.22);
    transition: transform 0.3s ease;
}

.pg-video-play:hover .pg-video-icon {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Swapped in by the facade script; fitted to the frame above. */
.pg-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #000;
}

.pg-video-foot {
    margin: 24px 0 0;
    text-align: center;
}

.pg-video-foot a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--theme-color-2);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.pg-video-foot a i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.pg-video-foot a:hover { color: var(--theme-color); }
.pg-video-foot a:hover i { transform: translateX(4px); }

@media (max-width: 767px) {
    .pg-video { margin-top: 28px; border-radius: 14px; }
    .pg-video-icon { width: 54px; height: 54px; font-size: 18px; box-shadow: 0 0 0 8px rgba(0, 152, 74, 0.22); }
}
