/* Portfolio Viewer Styles */

:root {
  --image-height: 550px;
  --is-mobile: false;
}

@media (max-width: 768px) {
  :root {
    --is-mobile: true;
  }
}

/* Portfolio Images Grid */
.portfolio-images {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.portfolio-item,
.model-details-card {
  position: relative;
  overflow: hidden;
  display: none;
  flex: 0 0 50%;
  max-width: 50%;
}

.portfolio-item.img-portrait {
  flex: 0 0 50%;
  max-width: 50%;
}

.portfolio-item.img-landscape {
  flex: 0 0 100%;
  max-width: 100%;
}

.portfolio-item.active,
.model-details-card.active {
  display: flex !important;
}

/* Portfolio layout for active items */
.portfolio-images {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
}

.portfolio-images .portfolio-item.active,
.portfolio-images .model-details-card.active {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex !important;
}

.portfolio-images .portfolio-item.img-landscape.active {
  flex: 0 0 100%;
  max-width: 100%;
}


.portfolio-image {
  height: var(--image-height);
  object-fit: contain;
  display: block;
}

/* Positioning classes for images */
.img-portrait-left {
  /* Styles for left image in a pair */
  height: var(--image-height);
  margin-left: auto;
}

.img-portrait-right {
  /* Styles for right image in a pair */
  height: var(--image-height);
  margin-right: auto;
}

.img-landscape {
  /* Styles for landscape images that take full width */
  max-height: var(--image-height);
  margin: 0 auto;
}

.img-portrait-center {
  /* Styles for single portrait images that should be centered */
  height: var(--image-height);
  margin-left: auto;
  margin-right: auto;
  /* flex: 1 !important; */
  max-width: 100% !important;
}

/* Parent container for centered portrait images */
.portfolio-item:has(.img-portrait-center) {
  flex: 1 !important;
  max-width: 100% !important;
}

/* Model Details Card */
.model-details-card {
  min-height: var(--image-height);
  background: #ffffff;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  color: #000000;
  display: none; /* Changed from flex to none to match other items */
  flex-direction: column;
  width: 460px;
  position: relative;
}

/* Add overlay when background image is present */
.model-details-card[style*="background-image"] {
  background-color: rgba(0, 0, 0, 0.3);
}

.model-details-card[style*="background-image"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.details-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 2rem;
  position: relative;
  z-index: 2;
}

.details-header h2 {
  font-size: 3rem;
  color: #000000;
  font-weight: 400;
}

.measurements-grid {
  display: grid;
  gap: 1rem;
  flex: 1;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.measurement-item {
  display: flex;
  gap: 1rem;
}

.measurement-item .label {
  color: #000000;
  font-weight: 600;
}

.measurement-item .value {
  color: #000000;
  font-weight: 400;
}

.languages,
.skills {
}

.languages .label,
.skills .label {
  color: #ffffff;
  font-weight: 500;
  display: block;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.languages .value,
.skills .value {
  color: #ffffff;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Social section styles */
.social {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

/* Instagram link styles */
.instagram-link,
.instagram-link:visited,
.instagram-link:hover,
.instagram-link:active,
.instagram-link:focus {
  color: #ffffff !important;
  text-decoration: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.instagram-link:hover {
  opacity: 0.8;
}

/* Navigation controls for portfolio */
.portfolio-controls {
  display: none;
  margin-top: 1rem;
}


#portfolio-content.active ~ .portfolio-controls,
#portfolio-content.active + .portfolio-controls {
  display: flex !important;
}

/* Mobile styles for portfolio viewer */
@media (max-width: 768px) {
  .portfolio-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .portfolio-item.active,
  .model-details-card.active {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .portfolio-image {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .viewer-controls {
    gap: 1rem;
  }
}

@media (max-width: 500px) {

  .model-details-card {
    background-size: contain;
    background-position: top center;
    max-width: 100vw;
    width: 100vw;
    box-sizing: border-box;
    max-height: 80vh;
    height: auto;
  }

  .measurements-grid{
    flex: none;
  }

  .portfolio-item.active {
    max-width: 100vw;
    width: 100vw;
    box-sizing: border-box;
    padding: 0;
  }
  .portfolio-item.active > .portfolio-image {
    max-width: 100vw;
    width: 100vw;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
}
