/* =========================================
   GLOBAL RESETS (PORTFOLIO CONTEXT)
   ========================================= */

/* Avoid global figure resets that might affect non-portfolio pages */
.project-page figure,
ul.portfolio-grid figure {
  margin: 0;
}


/* =========================================
   PORTFOLIO GRID (INDEX PAGE)
   ========================================= */

ul.portfolio-grid{
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

/* One canonical block for portfolio items */
ul.portfolio-grid > li.portfolio-item{
  box-sizing: border-box;
  padding: 0 10px 30px;
  flex: 0 0 25%;
  max-width: 25%;
}

.portfolio-item figure {
  margin: 0;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
}

.portfolio-caption {
  margin-top: 10px;
}

.portfolio-caption h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.portfolio-caption p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.portfolio-link {
  display: block;
  color: #000;
  text-decoration: none;
}

.portfolio-link:hover {
  color: #c00; /* or your brand red */
  text-decoration: none;
}


/* =========================================
   PORTFOLIO CHILD PAGES
   ========================================= */

.project-page{
  padding-left: 15px;
  padding-right: 15px;
}

/* Title + breadcrumb: stable rhythm (no conflicting margin-top rules) */
.project-page > h1{
  margin: 20px 0 10px;
  text-align: left;
  color: #2a2a2a;
}

#portfolio .project-page h1,
#portfolio .project-page .bread-on{
  text-align: left;
}


.project-page > .bread-on{
  text-align: left;
  display: block;
  width: 100%;
  float: none;
  font-size: 14px;
  margin-bottom: 20px;
}


/* If you’re using the two-column split right after breadcrumbs,
   let the breadcrumb spacing control the gap */
.project-page .bi-portfolio-split{
  margin-top: 0;
}

/* Breadcrumbs: keep Portfolio link red (as you have in main.css too) */
.project-page .bread-on a,
.project-page .bread-on a:link,
.project-page .bread-on a:visited {
  color: red !important;
  text-decoration: none;
}

.project-page .bread-on a:hover,
.project-page .bread-on a:focus {
  color: red !important;
  text-decoration: none;
}

/* Client/Strategy card text */
.project-page figcaption{
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.5em;
}

/* Portfolio child pages: sub-section divider */
.project-page .sub-sub-heading{
  border-bottom: 1px solid #dddddd;
  padding-bottom: 6px;
  margin-bottom: 15px;
}

/* Portfolio child pages: rule under "Ad Text" label */
.project-page .ad-label{
  font-weight: normal;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 6px;
  margin-bottom: 10px;
  color: #333333;
}

/* Ad module: headline should NOT have divider */
.project-page .ad-text h3{
  border: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 8px;
  margin-bottom: 10px;
}

/* Ad module: force consistent casing */

/* 
.project-page .ad-text{
  text-transform: uppercase; 
  font-size:14px;
}
 */
 

/* Closing rule for ad text */
.project-page .ad-end{
  border-bottom: 1px solid #dddddd;
  margin-top: 12px;
  margin-bottom: 18px;
}


/* =========================================
   TWO-COLUMN PORTFOLIO LAYOUT
   ========================================= */

/* Default split spacing (used when not immediately after breadcrumbs) */
.bi-portfolio-split{
  margin-top: 30px;
}

.text-measure{
  max-width: 520px;
}

.text-measure figcaption{
  width: 100%;
}


/* =========================================
   PROJECT FIGURE / “BILLBOARD CARD” STYLING
   ========================================= */

.project-page figure{
  margin: 0 0 30px;                 /* includes vertical spacing */
  background: #f3f3f3;
  border: 1px solid #dddddd;
  padding: 8px;                     /* “mat” space between figure edge and image */
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.project-page figure img{
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================
   PORTFOLIO BREAKPOINTS
   ========================================= */

@media (max-width: 1199px){
  ul.portfolio-grid > li.portfolio-item{
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
}

@media (max-width: 767px){
  ul.portfolio-grid > li.portfolio-item{
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 479px){
  ul.portfolio-grid > li.portfolio-item{
    flex: 0 0 100%;
    max-width: 100%;
  }
}


/* =========================================
   PORTFOLIO INDEX ONLY (OPTIONAL)
   ========================================= */

/* Keep these ONLY if your portfolio index page body (or wrapper) uses id="portfolio" */
#portfolio .main{
  padding-top: 24px;
}



