@font-face {
  font-family: 'Montserrat';
  src: url("./fonts/Montserrat-Regular.eot");
  src: local("☺"), url("./fonts/Montserrat-Regular.woff") format("woff"), url("./fonts/Montserrat-Regular.ttf") format("truetype"), url("./fonts/Montserrat-Regular.svg") format("svg");
  font-weight: 400;
  font-style: normal;
}

* {
  font-family: Montserrat;
  box-sizing: border-box;
}

:root {
  --primary: #fd5555;
  --primary-hover: #ff1b1b;
  --secondary: #050c16;
  --dark-bg: #000000;
  --light-text: #ffffff;
  --overlay-bg: rgba(0, 0, 0, 0.8);
}

body {
  background-color: var(--dark-bg);
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  padding: 0;
  min-height: 100vh;
}

.graphic-portfolio {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto 40px;
  position: relative;
}

/* -------- title style ------- */
.line-title-container {
  margin-top: 35px;
  margin-bottom: 50px;
  display: flex;
  justify-content: center;
}

.line-title {
  font-family: "Roboto", sans-serif;
  position: relative;
  display: flex;
  justify-content: center;
  width: 400px;
  font-size: 28px;
  padding-bottom: 20px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  text-align: center;
  font-size: 35px !important;
}

.line-title::before,
.line-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  border-radius: 2px;
}

.line-title::before {
  width: 100%;
  background: #f2f2f2;
}

.line-title::after {
  width: 32px;
  background: var(--primary);
}

.close {
  font-size: 50px;
  position: absolute;
  right: 2vh;
  top: 10px;
  color: var(--primary);
}


.close:hover {
  color: var(--primary-hover);
}

/* Mosaic Grid Layout */
.mosaic-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 200px;
  grid-gap: 20px;
  grid-auto-flow: dense;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #1a1a1a;
}

.mosaic-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(253, 85, 85, 0.3);
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mosaic-item:hover img {
  transform: scale(1.05);
}


/* Dynamic spans handled by JavaScript */

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #000;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--primary);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s;
  background: rgb(255 255 255 / 70%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
}

.close-modal:hover {
  color: var(--primary-hover);
  background: rgba(0, 0, 0, 0.9);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .mosaic-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-auto-rows: 180px;
  }

  .close {
    right: 5vh;
    font-size: 45px;
  }
}

@media (max-width: 768px) {
  .graphic-portfolio {
    padding: 15px;
  }

  .mosaic-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-auto-rows: 180px;
    grid-gap: 15px;
  }

  .line-title {
    width: 300px;
    font-size: 24px;
    padding-bottom: 15px;
  }

  .close {
    font-size: 40px;
    right: 3vh;
    top: 15px;
  }

  .overlay {
    padding: 15px;
  }

  .overlay h3 {
    font-size: 16px;
  }

  .overlay p {
    font-size: 12px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }

  .close-modal {
    font-size: 30px;
    width: 40px;
    height: 40px;
    top: 10px;
    right: 15px;
  }
}

@media (max-width: 576px) {
  .mosaic-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
    grid-gap: 12px;
  }

  /* Dynamic spans handled by JavaScript */

  .line-title {
    width: 250px;
    font-size: 22px;
    padding-bottom: 12px;
  }

  .close {
    font-size: 35px;
    right: 2vh;
    top: 10px;
  }

  .modal {
    padding: 10px;
  }

  .modal-content {
    max-width: 98%;
    max-height: 98%;
    border-radius: 10px;
  }

  .close-modal {
    font-size: 25px;
    width: 35px;
    height: 35px;
    top: 8px;
    right: 12px;
  }
}
.preview-wrapper {
  position: relative;
  top: 30px;
  right: 10px;
  left: 10px;
  z-index: 10;
}

.preview-wrapper a {
  color: #fff;
  display: block;
  height: 40px;
  position: relative;
  text-align: center;
  line-height: 40px;
  width: 40px;
  margin-bottom: 2px;
  z-index: 1;
  border-radius: 3px;

}

.preview-wrapper a:hover>span {
  visibility: visible;
  right: 41px;
  opacity: 1;
  border-radius: 3px;
}

.preview-wrapper a span {
  line-height: 40px;
  right: 60px;
  position: absolute;
  text-align: center;
  width: 120px;
  visibility: hidden;
  transition-duration: 0.5s;
  z-index: 1;
  opacity: 0;
}


.fixed-facebook,
.fixed-facebook span {
  background-color: var(--primary);
}

.fixed-twitter,
.fixed-twitter span {
  background-color: var(--primary);

}

.fixed-gplus,
.fixed-gplus span {
  background-color: var(--primary);

}

.fixed-linkedin,
.fixed-linkedin span {
  background-color: var(--primary);

}

.fixed-instagrem,
.fixed-instagrem span {
  background-color: var(--primary);

}
.fixed-whatsapp,
.fixed-whatsapp span {
  background-color: var(--primary);

}

.fixed-upwork,
.fixed-upwork span {
  background-color: var(--primary);

}

.fixed-tumblr,
.fixed-tumblr span {
  background-color: var(--primary);

}

@media (max-width: 400px) {
  .mosaic-container {
    grid-auto-rows: 160px;
  }

  .line-title {
    width: 220px;
    font-size: 20px;
  }

  .close {
    font-size: 30px;
    right: 1vh;
  }

  .overlay {
    padding: 12px;
  }

  .overlay h3 {
    font-size: 14px;
  }

  .overlay p {
    font-size: 11px;
  }
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  animation: modalFadeIn 0.3s ease;
}

/* Loading state for images */
.mosaic-item {
  background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.mosaic-item img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mosaic-item img.loaded {
  opacity: 1;
  background: none;
  animation: none;
}

/* Ensure proper image loading */
.mosaic-item img {
  transition: opacity 0.3s ease;
}

.mosaic-item img[src] {
  opacity: 1;
}

/* Behance Side Popup Styles */
.behance-trigger {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 999;
}

.behance-btn {
  background: var(--primary);
  color: var(--light-text);
  border: none;
  border-radius: 0 25px 25px 0;
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 2px 0 15px rgba(253, 85, 85, 0.3);
}

.behance-btn:hover {
  background: var(--primary-hover);
  padding-left: 25px;
}

.behance-btn i {
  font-size: 24px;
}

.behance-popup {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: var(--secondary);
  z-index: 1000;
  transition: left 0.4s ease;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
}

.behance-popup.show {
  left: 0;
}

.behance-popup-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--dark-bg);
}

.behance-header {
  padding: 20px;
  background: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.behance-header h3 {
  margin: 0;
  color: var(--light-text);
  font-size: 18px;
  font-weight: 600;
}

.behance-close {
  font-size: 28px;
  color: var(--light-text);
  cursor: pointer;
  transition: color 0.3s ease;
}

.behance-close:hover {
  color: var(--primary-hover);
}

.behance-body {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.behance-body p {
  color: var(--light-text);
  margin-bottom: 30px;
  line-height: 1.6;
  text-align: center;
}

.behance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: transform 0.3s ease;
}

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

.stat i {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}

.stat span {
  display: block;
  color: #cccccc;
  font-size: 12px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  color: var(--light-text);
  font-size: 18px;
  font-weight: 700;
}

.behance-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--light-text);
  text-decoration: none;
  padding: 15px 25px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 0 auto;
}

.behance-link:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(253, 85, 85, 0.4);
}

/* Responsive Design for Behance Popup */
@media (max-width: 768px) {
  .behance-popup {
    width: 320px;
    left: -320px;
  }
  .behance-trigger {
    top: 20%;
}
  .behance-btn {
    padding: 7px;
    font-weight: 400;
  }
  
  .behance-btn span {
    font-size: 11px;
  }
  
  .behance-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .behance-body {
    padding: 10px 20px;
  }
  
  .behance-link {
    padding: 12px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .behance-popup {
    width: 280px;
    left: -280px;
  }
  
  .behance-header {
    padding: 15px;
  }
  
  .behance-header h3 {
    font-size: 14px;
  }
  
  .behance-body p {
    font-size: 12px;
  }
}
@media (max-width: 600px) {
.line-title {
        padding-bottom: -10px  !important;
        width: 250px !important;
        margin-bottom: 20px !important;
        font-size: 25px !important;
    }
    .line-title-container {
    margin-top: 35px;
    margin-bottom: 10px;
    }
  
}


