/* ==========================================================================
   Homepage Featured Project Section Styling System
   ========================================================================== */
.featured-work-section {
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
    padding: 40px 0px;
    border-bottom: 1px solid rgba(0, 50, 78, 0.08);
}

.featured-work-section .section-header {
    margin-bottom: 3rem;
}

.featured-work-section h2 {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

/* Master Project Showcase Structural Card */
.project-showcase-card {
    background-color: rgba(0, 50, 78, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(0, 50, 78, 0.08);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Asymmetric 60/40 Grid Split */
.project-card-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
}

/* Content Panel Layout */
.project-card-info {
    padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background-color:  var(--bg-primary);
}

.project-card-info h3 {
    font-size: clamp(1.8rem, 1.5rem + 2vw, 2.6rem);
    margin: 0.5rem 0 1.25rem 0;
    line-height: 1.1;
}

.project-card-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

/* Structural Tag Elements */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
}

.project-tags .tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    background-color: rgba(0, 50, 78, 0.05);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.project-action .btn {
    padding: 16px 28px;
    font-size: clamp(.8rem, 5vw, 1.25rem);
}

/* Right Panel Visual Elements */
.project-card-visual {
    background-color: rgba(0, 50, 78, 0.04);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 50, 78, 0.08);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.project-card-visual .browser-frame-mock {
    background-color: rgba(0, 50, 78, 0.03);
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 50, 78, 0.06);
    display: flex;
    gap: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.project-card-visual .browser-frame-mock .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(0, 50, 78, 0.15);
}

.project-visual-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.featured-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

/* Fallback state parameters if image source fails or isn't uploaded yet */
.featured-preview-img:not([src]), 
.featured-preview-img[src=""] {
    display: none;
}

.visual-blueprint-fallback {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.featured-preview-img[src] ~ .visual-blueprint-fallback {
    display: none;
}

.bp-icon { font-size: 2rem; margin-bottom: 4px; opacity: 0.7; }
.bp-title { font-family: "Bebas Neue", sans-serif; font-size: 1.5rem; letter-spacing: 0.05rem; }
.bp-sub { font-size: 0.8rem; opacity: 0.7; font-family: monospace; }

/* ==========================================================================
   Automatic Dark Mode Theme Overrides
   ========================================================================== */
[data-theme="dark"] .project-showcase-card {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .project-card-visual {
    background-color: rgba(255, 255, 255, 0.01);
    border-left-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .project-card-visual .browser-frame-mock {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .project-card-visual .browser-frame-mock .dot {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .project-tags .tag {
    background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .featured-preview-img {
    filter: brightness(0.9);
}

/* ==========================================================================
   Responsive Viewport Breakdown Scaling Rules
   ========================================================================== */
@media (max-width: 960px) {
    .project-card-grid {
        grid-template-columns: 1fr; /* Stack layout seamlessly on tablets and smaller canvases */
    }
    .project-card-visual {
        border-left: none;
        border-top: 1px solid rgba(0, 50, 78, 0.08);
    }
    [data-theme="dark"] .project-card-visual {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    .project-visual-preview {
        min-height: 260px;
    }
}


/* ==========================================================================
   Homepage Side-by-Side Showcase Grid Split
   ========================================================================== */

/* Master row layout using CSS Grid */
.project-bento-split-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 2.5rem;
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  width: 100%;
}

/* Sub-card container overrides for flex column alignment */
.project-showcase-card.sub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 0; /* Clears massive full-width card margin-bottoms */
}

/* Force inner grid components to stretch to full card height */
.project-showcase-card.sub-card .project-card-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.white-bg{
    background-color: #ffffff;
}

.healing-well-home-img, .hw-home-img{
    height: auto;
    width: 80%;
    max-width: 500px;
}

/* Ensure visual teasers sit cleanly at the top of the split cards */
.project-showcase-card.sub-card .project-card-visual {
  width: 100%;
}

/* Flexbox alignments for card content to push buttons to the baseline */
.project-showcase-card.sub-card .project-card-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Microcopy structural description styling spacing overrides */
.project-showcase-card.sub-card p {
  font-size: 0.95rem;
  margin: 1rem 0;
  line-height: 1.5;
}

/* Forces project tag rows right above the action group button baseline */
.project-showcase-card.sub-card .project-tags {
  margin-top: auto;
  margin-bottom: 2rem;
}

/* Forces action button to stay pinned symmetrically at the absolute base */
.project-showcase-card.sub-card .project-action {
  margin-top: auto;
}

/* Makes the sub-buttons occupy the complete horizontal block footprint */
.project-showcase-card.sub-card .btn.primary {
  display: block;
  text-align: center;
  width: 100%;
}

/* Tablet & Mobile Collapse Override Breaks */
@media (max-width: 1024px) {
  .project-bento-split-row {
    grid-template-columns: 1fr; /* Stacks to a clean full-width vertical layout on mobile devices */
    gap: 3rem;
  }
}
