/* Case Studies Page - Pinterest Masonry Layout */
@import url("https://fonts.googleapis.com/css2?family=Roboto&family=Rubik:wght@500&display=swap");



a:active {
  background-color: transparent;
}

@font-face {
  font-family: "switzer";
  src: url(../font/switzer/Switzer-Variable.ttf);
}

@font-face {
  font-family: "santoshi";
  src: url(../font/santoshi/Satoshi-Variable.ttf);
}
/* ==================== CSS Variables ==================== */
:root {
  --primary: #1f80ff;
  --primary-dark: #1565c0;
  --bg-primary: #ffffff;
  --bg-secondary: #f0f0f0;
  --border: #2a2a2a;
  --text-primary: #000000;
  --text-secondary: rgba(57, 57, 57, 0.7);
  --text-tertiary: rgba(94, 94, 94, 0.5);
  --card-radius: 20px;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  --card-transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  --custom-font1: 'santoshi';
  --custom-font2: 'switzer';
}

/* ==================== Reset ==================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Rubik:wght@500&display=swap');
*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--custom-font1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Roboto",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}




/* ==================== Animations ==================== */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* @keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
} */

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==================== Hero Section ==================== */
.caseHero {
  padding: 140px 40px 80px;
  text-align: center;
  background: var(--bg-primary);
  position: relative;
  /* border: 1px solid red; */
}

.caseHeroContainer {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  /* z-index: 2; */
}

.caseHeroContent {
  opacity: 1;
  animation: fadeIn 1s ease-out;
}

.caseHeroTitle {
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 24px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.caseHeroSubtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  /* max-width: 700px; */
  margin: 0 auto;
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* ==================== Modern Bento Grid Layout ==================== */
.bentoGrid {
  padding: 60px 40px 120px;
  background: var(--bg-primary);
  min-height: 100vh;
  position: relative;
}

.bentoContainer {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}


/* Case Study Cards - Fixed Size Layout */
.bentoCard {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  background-color: var(--bg-secondary);
  transition: var(--card-transition);
  transform-origin: center;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  will-change: transform, box-shadow;
  animation: scaleIn 0.6s ease-out both;
  animation-delay: calc(0.1s * var(--card-index, 0));
  height: 480px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.bentoCard:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 5px 50px #5c5c5c4b;
  z-index: 10;
}

/* Card Image Container */
.bentoCardImage {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.bentoCardImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Card Content */
.bentoCardContent {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.bentoCard:hover .bentoCardContent {
  transform: translateY(0);
}

/* Card Hover Effects */


/* Column 1 - move DOWN */
.bentoCard:nth-child(3n + 1) {
  margin-top: 0px;
}

/* Column 2 - move UP */
.bentoCard:nth-child(3n + 2) {
  margin-top: 90px;
}

/* Column 3 - same as column 1 */
.bentoCard:nth-child(3n + 3) {
  margin-top: 0px;
}


/* Card Tags */
.bentoCardTags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bentoTag {
  background: rgba(31, 128, 255, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(31, 128, 255, 0.2);
}

/* Card Title & Description */
.bentoCardTitle {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bentoCardDescription {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== Big Card Style ==================== */
.caseCard {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.caseCard.hidden {
  display: none;
}

.caseCard:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  z-index: 10;
}

/* Card Image - Pinterest Style (variable heights) */
.caseCardImage {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  display: block;
  background: #222;
}

.caseCardImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.caseCard:hover .caseCardImage img {
  transform: scale(1.1);
}

/* Hover overlay - Full coverage on hover */
.caseCardHoverOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  z-index: 10;
}

.caseCard:hover .caseCardHoverOverlay {
  opacity: 1;
  visibility: visible;
}

/* Tags inside overlay */
.caseCardTags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.caseTag {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Card Content */
.caseCardContent {
  text-align: center;
  transform: translateY(30px);
  transition: transform 0.4s ease 0.1s;
  width: 100%;
}

.caseCard:hover .caseCardContent {
  transform: translateY(0);
}

/* Title - Larger for big cards */
.caseCardTitle {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Description */
.caseCardDescription {
  font-size: 16px;
  color: #ffffff !important;
  opacity: 0.95;
  line-height: 1.7;
  max-width: 90%;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Stats - Compact horizontal layout */
.caseCardStats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.caseStat {
  display: flex;
  flex-direction: column;
}

.caseStatValue {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

.caseStatLabel {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pinterest-style save/action button */
.caseCardLink {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 4;
  color: var(--bg-primary);
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.caseCard:hover .caseCardLink {
  opacity: 1;
  transform: scale(1.05);
}

.caseCardLink::after {
  content: "→";
  font-weight: 600;
}

/* ==================== Loading Message ==================== */
.caseLoadingMessage {
  text-align: center;
  padding: 100px 20px;
  color: #666;
  font-size: 16px;
  width: 100%;
}

/* ==================== Brand Logos ==================== */
.brandLogos {
  padding: 60px 0;
  background-color: var(--bg-primary);
  position: relative;
}

.logoContainer {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.7;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeIn 0.8s ease-out both;
  animation-delay: calc(0.1s * var(--logo-index, 0));
}

.logo:hover {
  opacity: 1;
  transform: scale(1.05);
}


.card:hover .overlay {
  opacity: 1;
  visibility: visible;
}

/* ==================== Smooth Entrance Animations ==================== */
@media (prefers-reduced-motion: no-preference) {
  .caseCard {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
  }

  .caseCard:nth-child(1) {
    animation-delay: 0.05s;
  }
  .caseCard:nth-child(2) {
    animation-delay: 0.1s;
  }
  .caseCard:nth-child(3) {
    animation-delay: 0.15s;
  }
  .caseCard:nth-child(4) {
    animation-delay: 0.2s;
  }
  .caseCard:nth-child(5) {
    animation-delay: 0.25s;
  }
  .caseCard:nth-child(6) {
    animation-delay: 0.3s;
  }
  .caseCard:nth-child(7) {
    animation-delay: 0.35s;
  }
  .caseCard:nth-child(8) {
    animation-delay: 0.4s;
  }
  .caseCard:nth-child(9) {
    animation-delay: 0.45s;
  }
}


/* ==================== Responsive Design ==================== */

/* Tablet */
@media (max-width: 1024px) {
  .bentoContainer {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    padding: 0 16px;
  }
  
  .bentoCard {
    height: 460px;
    min-height: 460px;
  }
  
  .bentoCardImage {
    height: 260px;
  }
}

/* Mobile */
@media (max-width: 768px) {

  .caseHero{
    padding: 100px 20px 10px;
  }

  .caseHeroTitle {
    font-size: 48px;
    width: 300px;
    margin: 0 auto;   /* center */
    margin-bottom: 2rem;
  }

  .caseHeroSubtitle{
    font-size: 16px;

  }
  .bentoGrid {
    padding: 40px 20px 80px;
  }
  
  .bentoContainer {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0;
  }
  
  .bentoCard {
    height: 420px;
    min-height: 420px;
  }
  
  .bentoCardImage {
    height: 220px;
  }
  
  .bentoCardContent {
    padding: 20px;
  }
  
  .bentoCardTitle {
    font-size: 18px;
  }
  
  .bentoCardDescription {
    font-size: 13px;
  }
  .bentoContainer {
    grid-template-columns: 1fr;
  }

  .bentoCard {
    margin-top: 0 !important;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .bentoCard {
    height: 400px;
    min-height: 400px;
  }
  
  .bentoCardImage {
    height: 200px;
  }
  
  .bentoCardContent {
    padding: 16px;
  }
}
