/* --- ========================================== --- */
/* --- V8: UNIVERSAL TEMPLATE (FINAL POLISH)    --- */
/* --- ========================================== --- */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;500;600&display=swap');

/* --- CUSTOMIZATION HUB --- */
:root {
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Playfair Display', serif;
  --color-background: #15171c;
  --color-white: #ffffff;
  --color-text-primary: #b5bacf;
  --color-text-secondary: #a0a0a0;
  
  /* STEP 1: CHANGE YOUR ACCENT COLOR HERE */
  --color-accent: #E3FF04;
  
  --border-radius: 8px;
  --section-spacing: 100px;
}
/* --- END CUSTOMIZATION HUB --- */


/* Base & Container */
body {
    background-color: var(--color-background);
}
#project-detail-content {
  font-family: var(--font-primary);
  padding: var(--section-spacing) 0;
}
.pd-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

/* General Typography & Layout */
.pd-header {
  text-align: center;
  margin-bottom: var(--section-spacing);
}
.pd-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.pd-category {
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pd-section-title {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}
.text-center { text-align: center; }

/* Section 2: Hero Image */
.pd-image-full {
  margin-bottom: var(--section-spacing);
}
/* ADD THIS NEW RULE FOR THE VIDEO */
.pd-image-full video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

/* Section 3: Overview Grid */
.pd-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: var(--section-spacing);
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
}
.pd-overview-grid h3 {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.pd-overview-grid p {
  color: var(--color-white);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}
.pd-overview-grid a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.pd-overview-grid a:hover { opacity: 0.8; }

/* Section 4: Story Block */
.pd-story-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto var(--section-spacing) auto;
}
.pd-story-item p {
    color: var(--color-text-primary);
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Section 5: Gallery Block */
.pd-gallery-block {
    margin-bottom: var(--section-spacing);
}
.pd-grid-1col { display: grid; gap: 30px; }
.pd-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.pd-grid-1col img, .pd-grid-2col img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.pd-grid-1col img:hover, .pd-grid-2col img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.pd-grid-2col figure { margin: 0; }
.pd-grid-2col figcaption {
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}
/* --- Asymmetrical Bento Grid Styles --- */
.pd-bento-grid {
    display: grid;
    /* The layout is built on a 4-column grid */
    grid-template-columns: repeat(4, 1fr);
    /* Set a base height for each row. Adjust as needed. */
    grid-auto-rows: 240px; 
    gap: 20px;
    margin-top: 2.5rem;
}

/* This is the key part for your images */
.pd-bento-grid figure {
    margin: 0;
    overflow: hidden; /* Ensures the hover effect doesn't spill out */
    border-radius: var(--border-radius);
}

.pd-bento-grid img {
    width: 100%;
    height: 100%;
    /* This makes any image shape fit and look good without distortion */
    object-fit: cover; 
    border-radius: var(--border-radius);
    transition: transform 0.4s ease;
}
.pd-bento-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}
.pd-bento-grid img:hover {
    transform: scale(1.05);
}

/* --- Grid Item Placement --- */
/* We tell specific items how many columns or rows to span */

/* Item 1: Tall block */
.bento-item-1 {
    grid-row: span 2;
}

/* Item 3: Wide block */
.bento-item-3 {
    grid-column: span 2;
}
/* Item 4: Wide block */
.bento-item-4 {
    grid-column: span 2;
}
/* Item 8: Wide block */
.bento-item-8 {
    grid-column: span 2;
}
/* --- Gallery Video Sizing & Fit Utilities --- */

/* 1. Base style for ALL videos in the bento grid */
.pd-bento-grid video {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    /* Ensure no unexpected hover effects */
    transition: none; 
}

/* 2. Utility Class for displaying video fully (e.g., in a 1x1 box) */
/* This will show black bars (letterboxing) to preserve 16:9 ratio */
.pd-bento-grid .video-fit-contain {
    object-fit: contain;
}

/* 3. Utility Class for filling the container (e.g., in a 2x1 box) */
/* This will crop the video to fill the space */
.pd-bento-grid .video-fit-cover {
    object-fit: cover;
}
/* All other items (2, 5, 6, 7) will automatically fill the remaining 1x1 slots. */
/* Section 6: Results & Testimonial */
.pd-results-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    margin: 0 auto var(--section-spacing) auto;
    border-radius: var(--border-radius);
}
.lifted-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(227, 255, 4, 0.07);
}
.pd-goals-list {
    list-style-type: none;
    padding-left: 25px;
    color: var(--color-text-primary);
    font-size: 1.1rem;
}
.pd-goals-list li {
    position: relative;
    margin-bottom: 0.75rem;
}
.pd-goals-list li::before {
    content: '✓';
    color: var(--color-accent);
    position: absolute;
    left: -25px;
}
.pd-testimonial blockquote {
  font-family: var(--font-primary);
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--color-white);
  border-left: 3px solid var(--color-accent);
  padding-left: 25px;
  margin: 0 0 20px 0;
  text-align: left;
}
.pd-testimonial cite {
  color: var(--color-text-secondary);
  font-style: normal;
  font-weight: 500;
  display: block;
  text-align: left;
  padding-left: 28px;
}

/* Section 7: Call to Action */
.cta-section {
  background-color: #000000;
  color: var(--color-white);
  text-align: center;
  padding: 80px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cta-section h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1rem;
}
.cta-section p {
  max-width: 600px;
  margin: 0 auto 30px auto;
  font-size: 1.1rem;
  opacity: 0.9;
}
.cta-button {
  display: inline-block;
  background-color: var(--color-accent);
  color: #15171c;
  padding: 15px 35px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
/* --- START: Bento Grid Gallery (Complete Code) --- */

/* --- Desktop Grid Layout --- */
.pd-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 20px;
    margin-top: 2.5rem;
}

.pd-bento-grid figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.pd-bento-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform 0.4s ease;
}

.pd-bento-grid img:hover {
    transform: scale(1.05);
}

/* Grid Item Placement */
.bento-item-1 { grid-row: span 2; }
.bento-item-3 { grid-column: span 2; }
.bento-item-4 { grid-column: span 2; }
.bento-item-8 { grid-column: span 2; }


/* --- Mobile Layout & Image Fix --- */
@media (max-width: 767px) {
    .pd-bento-grid {
        grid-template-columns: 1fr;
        /* Remove fixed row height to allow images to define their own height */
        grid-auto-rows: unset; 
    }

    .pd-bento-grid > figure {
        grid-column: 1 / -1; /* Ensures it takes up the full column */
        grid-row: auto;
    }

    /* This is the key fix to force correct image aspect ratios on mobile */
    .pd-bento-grid img {
        height: auto !important; /* The !important flag overrides conflicting styles */
        object-fit: contain; /* Ensures the whole image is visible */
    }
}
/*
==================================================
  CASE STUDY - LONG SCROLL GALLERY
==================================================
*/

.pd-long-scroll-gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
  
  max-width: 900px;
  margin: 0 auto;
  border-radius: 0;/* This ensures sharp corners */
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  overflow: hidden; 
}

.pd-long-scroll-gallery figure {
  margin: 0;
  padding: 0;
  line-height: 0; /* Removes any extra space below images */
}

.pd-long-scroll-gallery img {
  width: 100%;
}
/* --- END: Bento Grid Gallery --- */
/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 767px) {
  :root { --section-spacing: 60px; }
  
  .pd-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      /* THIS IS THE NEW LINE TO ADD SPACE AT THE TOP */
      margin-top: 40px;
  }
  
  .pd-title { font-size: 2.5rem; }
  .pd-section-title { font-size: 1.8rem; }
  .pd-story-block, .pd-grid-2col, .pd-results-block {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pd-testimonial blockquote { font-size: 1.3rem; }
  .cta-section h2 { font-size: 2.2rem; }
}
/*
============================================================
  FIX: Remove rounded corners from images inside the scroll gallery
============================================================
*/

.pd-long-scroll-gallery img {
    border-radius: 0 !important; /* Forces the images to have sharp corners */
}