/* ============================================================
   Page-specific styles migrated from the original inline <style>
   blocks (about / contact / services archive / portfolio).
   Backgrounds scoped via WordPress body classes to preserve the
   original per-page appearance.
   ============================================================ */

/* ---- Shared inner-page header ---- */
.page-header {
  padding: 10rem 0 6rem;
  text-align: center;
}
/* Matches the About page header (.about-header): flat lavender, same spacing. */
.post-type-archive-service .page-header {
  background: var(--color-secondary-lavender);
}
.page-template-page-portfolio .page-header {
  background: var(--color-secondary-lavender);
}
.page-template-page-testimonials .page-header {
  background: linear-gradient(135deg, var(--color-primary-peach) 0%, var(--color-secondary-lavender) 100%);
}

/* Balanced like .contact-header: navbar clearance comes from --navbar-height so
   the remaining 4rem is equal top and bottom, instead of a hardcoded top value
   that bakes the clearance into the visible spacing. */
.page-template-page-testimonials .page-header {
  padding: calc(var(--navbar-height) + 4rem) 0 4rem;
}

/* .section-subtitle's 3rem bottom margin would otherwise unbalance the band. */
.page-template-page-testimonials .page-header .section-subtitle {
  margin-bottom: 0;
}

/* ---- About page ---- */
.about-header {
  padding: 10rem 0 4rem;
  background: var(--color-secondary-lavender);
  text-align: center;
}
.bio-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}
.bio-image {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mission-vision {
  background: var(--color-white);
  padding: 4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: -3rem;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.philosophy-list li {
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.philosophy-list i {
  color: var(--color-primary-purple);
  margin-top: 0.25rem;
}
/* .mission-vision still collapses on tablets; .bio-section deliberately does
   not — it keeps the desktop two-column layout down to 768px (see below). */
@media (max-width: 992px) {
  .mission-vision {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
    margin-top: 0;
  }
}

/* Bio keeps the desktop design on tablets. The 4rem gap is oversized at this
   width, and a 1fr/2fr split makes the image column too narrow, so the columns
   are rebalanced rather than stacked. */
@media (max-width: 992px) {
  .bio-section {
    grid-template-columns: 1fr 1.6fr;
    gap: 2.5rem;
  }
}

/* Below 768px there is genuinely no room for two columns — stack there. */
@media (max-width: 767px) {
  .bio-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .bio-section {
    gap: 1.75rem;
  }
  .mission-vision {
    padding: 1.75rem 1.25rem;
  }
  .about-header,
  .page-header {
    padding: 7rem 0 2rem;
  }
  /* Split from the group above so the contact band keeps equal top/bottom
     spacing on phones; the others are left at their original values. */
  .contact-header,
  .page-template-page-testimonials .page-header {
    padding: calc(var(--navbar-height) + 2rem) 0 2rem;
  }
}

/* ---- Contact page ---- */
/* The top padding must clear the fixed navbar, which is why it was 10rem
   against a 4rem bottom — that offset is navbar clearance, not spacing, so the
   text sat low in the band. Deriving the clearance from --navbar-height and
   then adding an equal 4rem on both sides centres the text optically. */
.contact-header {
  padding: calc(var(--navbar-height) + 4rem) 0 4rem;
  background: var(--color-primary-peach);
  text-align: center;
}
/* .section-subtitle carries margin-bottom:3rem for in-page sections. Inside the
   header that trailing space is what unbalances the band, so drop it and let
   the header's own padding define the spacing. */
.contact-header .section-subtitle {
  margin-bottom: 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin: 4rem 0;
  align-items: start;
}
.contact-info-card {
  background: var(--color-primary-purple);
  color: var(--color-white);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.contact-info-card h2 {
  color: var(--color-primary-peach);
  margin-bottom: 2rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-item i {
  color: var(--color-primary-peach);
}
.contact-form {
  background: var(--color-white);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.contact-form .form-group {
  margin-bottom: 1.5rem;
}
.contact-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}
.contact-form .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition);
}
.contact-form .form-control:focus {
  outline: none;
  border-color: var(--color-primary-purple);
  box-shadow: 0 0 0 3px rgba(90, 58, 126, 0.1);
}
.contact-form textarea.form-control {
  resize: vertical;
  min-height: 150px;
}
@media (max-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin: 2.5rem 0;
  }
}

@media (max-width: 767px) {
  .contact-info-card,
  .contact-form {
    padding: 1.75rem 1.5rem;
  }
  /* Long email addresses are the usual overflow culprit in this panel. */
  .contact-item a,
  .contact-item p {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .contact-wrapper {
    gap: 2rem;
  }
}

/* ---- Services archive ---- */
.service-detail-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  transition: var(--transition);
}
.service-detail-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.service-icon-large {
  width: 80px;
  height: 80px;
  background: var(--color-secondary-lavender);
  color: var(--color-primary-purple);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.service-icon-large i {
  width: 40px;
  height: 40px;
}
.service-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-secondary-gray);
}
.benefit-item h4 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.benefit-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}
@media (max-width: 992px) {
  .service-detail-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 0rem;
  }
  .service-benefits {
    grid-template-columns: 1fr;
  }
}

/* ---- Portfolio gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  grid-auto-rows: 250px;
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(90, 58, 126, 0.9), transparent);
  padding: 2rem 1.5rem 1.5rem;
  color: var(--color-white);
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover {
  box-shadow: var(--shadow-lg);
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
  opacity: 1;
}
.gallery-overlay h3 {
  color: var(--color-white);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.gallery-overlay p {
  font-size: 0.9rem;
  opacity: 0.9;
}
/* Featured tiles stay 2x2 on tablet but the grid floor must shrink, otherwise
   the minmax(300px,…) track plus a span-2 item overflows a ~700px container. */
@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    grid-auto-rows: 220px;
  }
}

@media (max-width: 768px) {
  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gallery-grid {
    grid-auto-rows: 200px;
    gap: 1rem;
  }
  /* Overlay is hover-revealed on desktop; on touch it must always be visible. */
  .gallery-overlay {
    padding: 1.5rem 1rem 1rem;
  }
}

/* ---- Very small screens (≤360px): prevent horizontal overflow ---- */
@media (max-width: 360px) {
  /* minmax(300px,…) track is wider than the ~290px content area */
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  /* Trim large 3rem card padding so inner content fits */
  .contact-info-card,
  .contact-form,
  .service-detail-card {
    padding: 1.75rem 1.25rem;
  }
}

/* ---- Form status messages (added for WP form handler) ---- */
.bc-form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-weight: 500;
  font-size: 0.95rem;
}
.bc-form-status.is-success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.bc-form-status.is-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}
/* Visually-hidden honeypot wrapper */
.bc-hp-wrap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.page-id-7 .page-header {
    padding: 12rem 0 3rem;
}
/* Matches the testimonials/contact headers: navbar clearance is derived from
   --navbar-height so the remaining 4rem is equal top and bottom, rather than a
   hardcoded top value that bakes the clearance into the visible spacing. */
.post-type-archive-service .page-header,
.page-template-page-services .page-header {
    padding: calc(var(--navbar-height) + 4rem) 0 4rem;
}
.post-type-archive-service .page-header .section-subtitle,
.page-template-page-services .page-header .section-subtitle {
    margin-bottom: 0;
}
@media (max-width: 992px) {
.post-type-archive-service .page-header,
.page-template-page-services .page-header {
    padding: calc(var(--navbar-height) + 2.5rem) 0 2.5rem;
}
}
@media (max-width: 768px) {
.post-type-archive-service .page-header,
.page-template-page-services .page-header {
    padding: calc(var(--navbar-height) + 2rem) 0 2rem;
}

  .service-detail-card {
    margin-bottom: 3rem;
  }
}
@media (max-width: 991px){
.contact-header {
    padding: calc(var(--navbar-height) + 2.5rem) 0 2.5rem;
}
.page-id-7 .page-header {
    padding: 10rem 0 2rem;
}
/* Split from .page-id-7 above so testimonials tracks the contact header's
   balanced spacing; portfolio keeps its original values. */
.page-template-page-testimonials .page-header {
    padding: calc(var(--navbar-height) + 2.5rem) 0 2.5rem;
}
}
/* Full-width bio image belongs to the stacked layout: moved from 768px to 767px
   to match the stack breakpoint, otherwise at exactly 768px the image stretches
   while the grid is still two columns. */
@media (max-width: 767px) {
.page-id-5 .bio-section .bio-image{
  width: 100% !important;
}
.page-id-5 .bio-section .bio-image img{
  width: 100% !important;
}
}

@media (max-width: 768px) {
.nav-dropdown{
  text-align: center;
}
}

.page-id-5 .py-6{
      padding: 6rem 0 0rem 0;
}

/* Centring + side padding belong to the stacked layout only. The bio now keeps
   its two-column design down to 768px, where centred text beside an image reads
   as misaligned, so this applies from 767px down instead of 991px. */
@media (max-width: 767px) {
  .page-id-5 .bio-section .bio-content {
    padding-left: 2.25rem;
    padding-right: 2.25rem;
    text-align: center;
  }

  /* The philosophy items are flex rows (icon + text), so text-align alone
     leaves them left-packed — center the row itself. */
  .page-id-5 .bio-section .bio-content .philosophy-list li {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 320px) {
    .cta-section {
        margin: 0rem auto !important;
        padding: 2.5rem 1.5rem;
        border-radius: var(--radius-lg);
    }
}