/*
 Theme Name:   GeneratePress Child
 Template:     generatepress
 Version:      1.0.0
*/




/* --------------------------------------------------
   FEATURED PRODUCT
-------------------------------------------------- */

/* Full-width archive layout */
body.post-type-archive-loan_product .site-content {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.loan-slide-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.swiper-pagination {
    display: none;
}

/* Image wrapper */
.loan-slide-image {
    width: 500px;
    height: 350px;
    overflow: hidden;
}

/* Image (both declarations merged) */
.loan-slide-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Location row + featured pill */
.loan-location-row {
    display: flex;
    align-items: center;
    grid-gap: 10px;
    flex-wrap: wrap;
}

.loan-featured-pill {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    background: #C8A24A;
    color: #f7f8f9
;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    top: -4px;
}

/* Arrows */
.swiper-button-next,
.swiper-button-prev {
    color: #C8A24A!important;
}

/* Text column */
.loan-slide-text {
    max-width: 500px;
    text-align: left;
}

.loan-location {
    font-size: 18px;
    margin-bottom: 8px;
}

.loan-amount {
    font-size: 18px;
    margin-bottom: 20px;
}

.loan-description {
    line-height: 1.6;
    font-size: 16px;
}
	
/* Loan CTA */
.loan-cta {
    margin-top: 12px;
}

.loan-cta-link {
    font-size: 18px;
    font-weight: 600;
    color: #ce9732;
    padding-bottom: 2px;
}

.loan-cta-link:hover {
    opacity: 0.8;
}

/* --------------------------------------------------
   MOBILE (<900px)
-------------------------------------------------- */

@media (max-width: 900px) {

    .loan-type-title {
        font-size: 30px;
    }	

    /* Ensure Swiper doesn't overflow */
    .swiper-slide {
        width: 100% !important;
    }
	
	body.post-type-archive-loan_product * {
    max-width: 100% !important;
}

    /* Stack image + text */
    .loan-slide-container {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0!important;
        gap: 20px !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    /* Mobile image wrapper */
    .loan-slide-image {
        width: 100% !important;
        height: auto !important;
        overflow: hidden !important;
        border-radius: 10px !important;
        -webkit-border-radius: 10px !important;
        clip-path: inset(0 round 10px);
    }

    /* Mobile image */
    .loan-slide-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        -webkit-border-radius: 10px !important;
    }

    /* Mobile text */
    .loan-slide-text {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-top: 0!important;
        box-sizing: border-box !important;
    }
	
    /* Mobile loan amount */
	.loan-amount {
		margin-bottom: 12px;
	}

    /* Arrows moved below */
    .swiper-button-next,
    .swiper-button-prev {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 20px auto 0 auto !important;
        width: 40px;
        height: 40px;
    }

    .swiper-button-prev {
        float: left;
    }

    .swiper-button-next {
        float: right;
    }

    /* Force containers to fit slide width */
    .loan-slide-image,
    .loan-slide-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* NEW: Featured Project pill on new line */
    .loan-location-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .loan-featured-pill {
        top: 0 !important;
        margin-bottom: 12px;
    }
}


/* ----- Loan Program Tabs: polish ----- */
.lp-tabs{
  --lp-brand:#0f3e2e;         /* tweak to your green */
  --lp-border:#efefef;
  --lp-bg:#ce9732;            /* active/selected orange */
  --lp-panel:#ffffff;
  --lp-muted:#3A6158;
  --lp-radius:12px;
}

/* Tab bar */
.lp-tabs .lp-tablist{
  display:flex;
  flex-wrap:nowrap;
  gap:.5rem;                  /* was grid-gap */
  overflow:auto;
	margin-top: 30px;
  padding-bottom:0;           /* no extra space */
  border-bottom:0;            /* no seam under tabs */
}
.lp-tabs .lp-tab{
  background:#042E26;         /* green tabs by default */
  color:#fff;                 /* white text */
  border:2px solid var(--lp-border);
  border-radius:.6rem .6rem 0 0;
  padding:.6rem .9rem;
}
/* CHANGED: lighter green on hover/focus */
.lp-tabs .lp-tab:hover,
.lp-tabs .lp-tab:focus-visible{
  background:#3A6158;
  color:#fff;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;

}
.lp-tabs .lp-tab.is-active{
  background:var(--lp-bg);    /* orange when active */
  color:#fff !important;
  border-color:var(--lp-border);
}

/* Panel */
.lp-tabs .lp-panel {
  background:var(--lp-panel);
  border:2px solid var(--lp-border);
  border-radius:0 var(--lp-radius) var(--lp-radius) var(--lp-radius);
  padding: 30px;
  margin-top:0;               /* flush under tabs on desktop too */
}
.lp-tabs .lp-title{ margin:.2rem 0 .6rem;}
.lp-tabs .lp-summary p{ margin:.5rem 0; }

/* Section headers */
.lp-tabs .lp-group{ margin:1.25rem 0 0; }
.lp-tabs .lp-group-title{
  margin:0 0 .25rem;
  color:var(--lp-brand);
  display:flex; align-items:center; gap:.6rem;
}
.lp-tabs .lp-group-title::after{
  content:"";
  height:2px; flex:1;
  background:var(--lp-border);
}

/* Rows — make them real rows with separators */
.lp-tabs .lp-grid{ display:block !important; }
.lp-tabs .lp-row{
  display:grid !important;                  /* pair stays together */
  grid-template-columns:minmax(220px,1fr) 2fr;
  gap:.75rem 1rem;
  padding: 15px 10px 15px 10px;
  border-top:2px dashed var(--lp-border);
}
.lp-tabs .lp-row:first-child{ border-top:0; }

.lp-tabs .lp-term{
  color:var(--lp-muted);
  display:flex;
  font-weight:700;
  align-items:center;
  gap:.5rem;
}
.lp-tabs .lp-term .fa-solid{ opacity:.85; }
/* center both grid items */
.lp-tabs .lp-row{ align-items: center; }

/* also center the content inside the value cell */
.lp-tabs .lp-desc{ align-items:center; }

/* kill stray paragraph margins that fight centering */
.lp-tabs .lp-desc p:first-child{ margin-top:0; }
.lp-tabs .lp-desc p:last-child{  margin-bottom:0; }


/* mobile options */
@media (max-width: 768px){
  .lp-tabs .lp-tablist{
    flex-direction: column;
    align-items: stretch;
    gap: 0;                 /* IMPORTANT: no built-in gap */
    overflow: visible;
    padding-bottom: 0;
    border-bottom: 0;
  }
	.lp-tabs .lp-panel {
		padding: 20px;
	}
  .lp-tabs .lp-tab{
    font-size: .95rem;
    width: 100%;
    text-align: left;
    flex: 0 0 auto;
    white-space: normal;
    border-radius: var(--lp-radius);
    margin: 0;              /* reset margins */
  }
  /* space between other tabs only */
  .lp-tabs .lp-tablist > .lp-tab + .lp-tab{ margin-top: .5rem; }
  .lp-tabs .lp-tablist > .lp-panel + .lp-tab{ margin-top: .5rem; }

  /* fuse active tab + panel */
  .lp-tabs .lp-tab.is-active{
    background: #ce9732;
	color: #fff;
    border-bottom-color: transparent;
	border-color: #ce9732;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .lp-tabs .lp-tablist > .lp-tab.is-active + .lp-panel{
    margin-top: 0;
    border-top: 0;
    border-radius: 0 0 var(--lp-radius) var(--lp-radius);
  }

  /* content */
  .lp-tabs .lp-row{ grid-template-columns: 1fr; }
  .lp-tabs .lp-term{ color: var(--lp-brand); }
}
