/* ============================================
   Split Screen Showcase for Portfolio Projects
   Clean & Professional Design
============================================ */

.split-portfolio {
  padding: 0;
  background: #ffffff;
  min-height: 100vh;
  position: relative;
}

/* Portfolio Title Styling */
.split-portfolio .main_title {
  background: #ffffff;
}

.split-portfolio .main_title h2 {
  color: #1a1a1a;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: "Rubik", sans-serif;
}

.split-portfolio .main_title p {
  color: #6c757d;
  font-size: 16px;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

.projects-title-wrap {
  background: #ffffff;
  padding: 16px 15px 6px;
}

.projects-main-title {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  text-align: center;
}

.projects-main-title h2 {
  font-size: 2.8rem !important;
  font-weight: 700;
  color: #1f2937 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
  font-family: "Rubik", sans-serif;
}

.projects-main-title h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
  border-radius: 2px;
}

.split-container {
  display: flex;
  height: 100vh;
  position: sticky;
  top: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Left Side - Projects List */
.split-left {
  width: 35%;
  background: #ffffff;
  padding: 50px 40px;
  overflow-y: auto;
  position: relative;
  z-index: 2;
  border-right: 1px solid #e9ecef;
}

.split-left::-webkit-scrollbar {
  width: 6px;
}

.split-left::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.split-left::-webkit-scrollbar-thumb {
  background: #4f46e5;
  border-radius: 3px;
}

.split-left::-webkit-scrollbar-thumb:hover {
  background: #4338ca;
}

.split-header {
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e9ecef;
}

.split-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
  font-family: "Rubik", sans-serif;
}

.split-header p {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;
}

/* Project List Items */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: none;
  position: relative;
  background: #ffffff;
  border: 1px solid #eef0f4;
}

.project-item:hover {
  background: rgba(79, 70, 229, 0.1) !important;
  border-color: rgba(79, 70, 229, 0.1) !important;
  box-shadow: none !important;
}

.project-item.active {
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.1);
  box-shadow: none;
}

.project-number {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
  color: #4f46e5;
  font-weight: 700;
  margin-bottom: 0;
  display: block;
  transition: none;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.project-item.active .project-number {
  color: #4f46e5;
}

.project-name {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  font-family: "Rubik", sans-serif;
  transition: none;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-item.active .project-name {
  color: #1a1a1a;
}

.project-category {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(17, 24, 39, 0.04);
  font-size: 10px;
  color: #667085;
  margin: 2px 0 0;
  transition: none;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-item.active .project-category {
  background: rgba(17, 24, 39, 0.04);
  color: #667085;
}

.project-item:hover .project-category {
  background: rgba(17, 24, 39, 0.04);
  color: #667085;
}

.project-tags {
  grid-column: 2;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.project-tag {
  padding: 4px 10px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 11px;
  color: #4f46e5;
  font-weight: 600;
  transition: none;
}

.project-item:hover .project-tag {
  background: #e9ecef;
  border-color: #dee2e6;
}

.project-item.active .project-tag {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.mobile-projects-title {
  display: none;
}

/* Right Side - Preview */
.split-right {
  width: 65%;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 190px;
}

.preview-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.preview-image-wrapper {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 30px;
  border: 1px solid #f0f0f0;
}

.preview-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 12px;
  transition: none;
}

/* Preview Info Overlay */
.preview-overlay {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
  background: #ffffff;
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10;
}

.preview-item.active .preview-overlay {
  opacity: 1;
  transform: translateY(0);
}

.preview-content {
  max-width: 100%;
}

.preview-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  font-family: "Rubik", sans-serif;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-tags .project-tag {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.preview-description {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 18px;
}

.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #4f46e5;
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.preview-btn:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  color: #fff;
}

/* Project Counter */
.project-counter {
  position: absolute;
  top: 40px;
  right: 40px;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 15px;
  color: #6c757d;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}

.project-counter .current {
  font-size: 24px;
  color: #4f46e5;
  font-weight: 700;
  margin-right: 5px;
}

/* Mobile Preview Blocks */
.mobile-project-preview {
  display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .split-left {
    width: 40%;
    padding: 50px 35px;
  }

  .split-right {
    width: 60%;
    padding: 30px;
  }

  .preview-title {
    font-size: 28px;
  }

  .preview-image-wrapper {
    padding: 20px;
  }

  .preview-item {
    padding: 30px 20px 170px;
  }
}

@media (max-width: 992px) {
  .split-container {
    flex-direction: column;
    height: auto;
  }

  .split-left,
  .split-right {
    width: 100%;
  }

  .split-left {
    padding: 50px 25px;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }

  .mobile-projects-title {
    display: none;
  }

  .projects-title-wrap {
    padding: 14px 15px 4px;
  }

  .projects-main-title h2 {
    font-size: 2.25rem !important;
    margin-bottom: 18px;
  }

  .split-right {
    height: 70vh;
    min-height: 500px;
    padding: 30px 20px;
  }

  .split-header h2 {
    font-size: 28px;
  }

  .project-name {
    font-size: 20px;
  }

  .preview-title {
    font-size: 24px;
  }

  .preview-overlay {
    padding: 25px;
    bottom: 20px;
    left: 20px;
    right: 20px;
  }

  .preview-image-wrapper {
    padding: 20px;
  }

  /* Portfolio Title Responsive */
  .split-portfolio .main_title h2 {
    font-size: 32px;
  }

  .split-portfolio .main_title p {
    font-size: 15px;
  }

  .split-right {
    display: none !important;
  }

  .project-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    column-gap: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    text-align: left;
  }

  .project-item.active {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.1);
    box-shadow: none;
  }

  .project-item.active .project-name {
    color: #1a1a1a;
  }

  .project-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .project-item.active .project-number {
    color: #4f46e5;
  }

  .project-category,
  .project-item.active .project-category {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    align-self: flex-start;
    padding: 6px 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .project-tag,
  .project-item:hover .project-tag,
  .project-item.active .project-tag {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
  }

  .mobile-project-preview {
    display: contents;
  }

  .mobile-preview-image {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 14px;
  }

  .mobile-preview-image {
    width: 100%;
    box-sizing: border-box;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
  }

  .mobile-preview-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    object-position: center center;
    margin: 0 auto;
  }

  .mobile-preview-description {
    grid-column: 1 / -1;
    grid-row: 4;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
  }

  .mobile-preview-action {
    grid-column: 1 / -1;
    grid-row: 6;
    text-align: left;
  }

  .mobile-preview-action a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #4f46e5;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
  }

  .project-number {
    grid-column: 1;
    grid-row: 1;
    align-self: baseline;
    text-align: left;
  }
  .project-name {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }
  .project-category {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .project-tags {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .split-left {
    padding: 40px 20px;
  }

  .split-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }

  .split-header h2 {
    font-size: 26px;
  }

  .split-header p {
    font-size: 14px;
  }

  .project-item {
    padding: 20px 15px;
  }

  .project-name {
    font-size: 18px;
  }

  .project-category {
    font-size: 13px;
  }

  .preview-title {
    font-size: 22px;
  }

  .preview-description {
    font-size: 14px;
  }

  .project-counter {
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 14px;
  }

  .project-counter .current {
    font-size: 24px;
  }

  .preview-image {
    max-height: 100%;
  }

  /* Portfolio Title Mobile */
  .split-portfolio .main_title {
    padding: 60px 0 30px 0 !important;
  }

  .split-portfolio .projects-main-title {
    padding: 0 !important;
  }

  .split-portfolio .main_title h2 {
    font-size: 28px;
  }

  .split-portfolio .projects-main-title h2 {
    font-size: 2rem !important;
    margin-bottom: 16px;
  }

  .split-portfolio .main_title p {
    font-size: 14px;
  }
}

/* Loading Animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.project-item {
  animation: slideInLeft 0.5s ease forwards;
  opacity: 0;
}

.project-item:nth-child(1) {
  animation-delay: 0.05s;
}
.project-item:nth-child(2) {
  animation-delay: 0.1s;
}
.project-item:nth-child(3) {
  animation-delay: 0.15s;
}
.project-item:nth-child(4) {
  animation-delay: 0.2s;
}
.project-item:nth-child(5) {
  animation-delay: 0.25s;
}
.project-item:nth-child(6) {
  animation-delay: 0.3s;
}
.project-item:nth-child(7) {
  animation-delay: 0.35s;
}
.project-item:nth-child(8) {
  animation-delay: 0.4s;
}
.project-item:nth-child(9) {
  animation-delay: 0.45s;
}
.project-item:nth-child(10) {
  animation-delay: 0.5s;
}

.preview-image-wrapper {
  animation: fadeIn 0.6s ease forwards;
}

/* Accessibility */
.project-item:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.preview-btn:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .split-container {
    display: block;
    height: auto;
  }

  .split-left,
  .split-right {
    width: 100%;
    page-break-inside: avoid;
  }

  .project-counter {
    display: none;
  }
}
