/* --- Grid Layout --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  /* Mobile: 1 column */
  gap: 60px;
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (min-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    /* Desktop: 2 columns */
  }
}

/* --- The Clickable Card --- */
.portfolio-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  margin-bottom: 10px;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

/* --- Device Composition Wrapper --- */
.devices-wrapper {
  position: relative;
  width: 100%;
  /* This aspect ratio prevents layout shifts. Adjust based on your images */
  padding-bottom: 60%;
  margin-bottom: 20px;
}

/* --- Monitor Styles --- */
.monitor-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 90%;
  /* Monitor doesn't take full width to leave room for phone overlap */
  z-index: 1;
  background-image: url(./portfolio/desktop.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.monitor-frame {
  width: 100%;
  display: block;
  pointer-events: none;
  /* Let clicks pass through to container */
}

/* The actual screenshot inside the monitor */
.monitor-screen {
  position: absolute;
  /* You must adjust these 4 values to fit your specific monitor frame image bezel */
  /* top: 4%; 
  left: 4%;
  width: 92%;
  height: 83%;
  overflow: hidden;
  background-color: #000; */
  z-index: -1;
  /* Puts image behind frame if frame has transparent screen */


  top: 2.5%;
  left: 2%;
  width: 92%;
  height: 65%;
  overflow: hidden;
  background-color: #fff;

  min-width: 96%;
}

/* If your frame has a black screen and isn't transparent, change z-index to 2 
   and carefully align top/left/width/height to cover the black area */

.monitor-screen img {
  width: 100%;
  height: auto;
  max-height: 105%;
  object-fit: cover;
  /* or contain, depending on image preference */
  object-position: top;
}

/* --- Phone Styles --- */
.phone-container {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18%;
  /* Size of phone relative to container */
  z-index: 10;
  filter: drop-shadow(5px 5px 15px rgba(0, 0, 0, 0.3));
  /* Adds shadow for depth */
}

.phone-frame {
  width: 100%;
  display: block;
  pointer-events: none;
}

/* The actual screenshot inside the phone */
.phone-screen {
  position: absolute;
  /* Adjust these to fit your specific phone frame bezel */
  top: 1px;
  left: 0px;
  width: 100%;
  height: calc(100% - 2px);
  overflow: hidden;
  border-radius: 3px;
  /* Rounds the corners of the screenshot */
  background-color: #000;
  z-index: -1;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* --- Text & Logo Info Area --- */
.project-details {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  position: absolute;
  width: 80%;
  bottom: 18px;
  z-index: 999;
  align-items: flex-end;
}

.logo-area {
  max-width: 200px;
  margin-right: auto;
  margin-top: auto;
}

.info-area {
  flex: 1;
  text-align: right;
  margin-top: auto;
  padding-bottom: 10px;
}

.logo-area img {
  height: 56px;
  margin-top: 10px;
  background-color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
}

.company-logo {
  max-height: 50px;
  max-width: 150px;
  object-fit: contain;
}


.project-name {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

.location-text {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
  display: block;
}

@media screen and (max-width:830px) {
  .portfolio-grid{padding: 20px 10px 0px 10px; gap: 10px;}
     
  
}