/* --- case-study.css --- */

/* Hero Section */
.cs-hero {
    text-align: center;
    padding-top: 60px;
    background-color: #fafafa;
}

.cs-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5%;
}

.cs-tag {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 15px;
    display: block;
}

.cs-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.cs-subtitle {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 50px;
    line-height: 1.6;
}

/* Meta Grid (Role, Timeline, Tools) */
.cs-meta-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 60px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 30px 0;
}

.meta-item h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
    font-weight: 400;
}

.meta-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
}

/* Hero Image */
.cs-hero-image {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    line-height: 0;
}

.cs-hero-image img {
    width: 100%;
    height: auto;
}

/* Body Content */
.cs-body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 5%;
}

.cs-section {
    margin-bottom: 100px;
}

.cs-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #000;
}

.cs-section p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.cs-list {
    margin-bottom: 40px;
    padding-left: 20px;
}

.cs-list li {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #333;
}

/* Image Placeholders & Grids */
.cs-image-block {
    margin: 40px 0;
}

.cs-image-block img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.placeholder-box {
    width: 100%;
    height: 300px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: 500;
    border-radius: 12px;
    border: 2px dashed #ccc;
}

.caption {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    margin-top: 15px;
    font-style: italic;
}

.cs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 2x2 Grid for 4 Images - Featured Layout */
.cs-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin: 60px 0;
}

/* First image takes full width at top */
.cs-grid-2x2 .cs-image-block:first-child {
    grid-column: 1 / -1;
}

/* Other images smaller below */
.cs-grid-2x2 .cs-image-block:nth-child(2),
.cs-grid-2x2 .cs-image-block:nth-child(3),
.cs-grid-2x2 .cs-image-block:nth-child(4) {
    grid-column: span 1;
}

/* Small 3x1 image row (thumbnails) */
.cs-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 30px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.cs-grid-3 .cs-image-block {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.cs-grid-3 .cs-image-block img {
    width: 100%;
    height: 280px; /* fixed height for fill effect */
    object-fit: cover; /* fill the container (may crop) */
    display: block;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.thumb-caption {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #555;
    font-size: 0.95rem;
    font-style: italic;
}

@media (max-width: 1024px) {
    .cs-grid-3 { max-width: 900px; }
    .cs-grid-3 .cs-image-block { height: 180px; }
}

@media (max-width: 768px) {
    .cs-grid-3 { grid-template-columns: 1fr; gap: 18px; max-width: 100%; }
    .cs-grid-3 .cs-image-block { height: 220px; }
}

/* Two-Column Content Layout (for side-by-side text and lists) */
.cs-content-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 40px 0;
}

.cs-content-2col > * {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center; /* center content vertically */
}

.cs-content-2col p {
    margin-bottom: 20px;
}

.cs-content-2col .cs-list {
    margin-bottom: 0;
}

/* Large mockup area for dashboard / ticket list */
.cs-mockup-large {
    margin: 70px 0;
    display: flex;
    justify-content: center;
}

.cs-mockup-large .mockup-box {
    width: 100%;
    max-width: 1200px;
    height: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.cs-mockup-large .mockup-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 1024px) {
    .cs-mockup-large .mockup-box { padding: 18px; max-width: 900px; }
}

@media (max-width: 768px) {
    .cs-mockup-large .mockup-box { padding: 12px; max-width: 100%; }
}

/* Mockup title & caption styling */
.mockup-wrapper { text-align: center; width: 100%; }
.mockup-title {
    font-size: 1.6rem;
    margin-bottom: 18px;
    color: #111;
    font-weight: 600;
}
.mockup-caption {
    display: block;
    margin-top: 12px;
    color: #4a4a4a; /* slightly darker for better contrast */
    font-size: 0.95rem;
    font-style: italic;
}

/* Stats Section */
.cs-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-box {
    background: #fafafa;
    padding: 30px;
    border-radius: 12px;
    flex: 1;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 2.5rem;
    color: #d0021b;
    margin-bottom: 5px;
}

/* Footer Nav */
.cs-footer-nav {
    margin-top: 100px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.cs-footer-nav a {
    text-decoration: none;
    font-weight: 600;
    color: #000;
    font-size: 1.2rem;
}

.cs-footer-nav a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cs-hero h1 { font-size: 2.5rem; }
    .cs-meta-grid { flex-direction: column; gap: 20px; text-align: center; }
    .cs-grid-2 { grid-template-columns: 1fr; }
    .cs-grid-2x2 { grid-template-columns: 1fr; }
    .cs-grid-2x2 .cs-image-block:first-child { grid-column: 1; }
    .cs-content-2col { grid-template-columns: 1fr; gap: 20px; }
    .cs-stats { flex-direction: column; }
}

/* --- MODAL/LIGHTBOX STYLING --- */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
}

.modal-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    font-weight: 300;
    transition: color 0.3s ease;
    z-index: 3001;
}

.modal-close:hover {
    color: #ccc;
}

/* Make images clickable */
.cs-image-block.clickable img {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.cs-image-block.clickable img:hover {
    opacity: 0.7;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.exploration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-areas:
    "chess linkedin"
    "steam steam";
  gap: 24px;
}

.card.chess {
  grid-area: chess;
}

.card.linkedin {
  grid-area: linkedin;
}

.card.steam {
  grid-area: steam;
}

.card.steam {
  min-height: 420px;
}

.card {
  background-size: cover;
  background-position: center;
}

@media (max-width: 768px) {
  .exploration-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chess"
      "linkedin"
      "steam";
  }
}
