/* Lovetree Mobile Optimized View - Image 3 Realization */

@media (max-width: 768px) {
  /* 🎨 VERTICAL ZIGZAG PATH (Image 3) */
  .ctd-main {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .canvas-area {
    width: 100%;
    min-height: 1000px;
    padding: 60px 20px;
    background: #fdfaf4;
    overflow-x: hidden;
  }

  .tree-canvas-inner {
    width: 100%;
    height: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 100px;
  }

  /* Vertical Trunk Line */
  .journey-line {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    background: rgba(181, 110, 110, 0.2);
    box-shadow: none;
  }

  /* Zigzag Nodes */
  .ctd-node {
    position: relative;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100%;
    margin-bottom: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .node-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 30;
  }

  .node-card {
    width: 42%;
    font-size: 0.8rem;
    padding: 8px;
  }

  /* Alternate Left/Right */
  .ctd-node:nth-child(even) { justify-content: flex-end; padding-right: 5%; }
  .ctd-node:nth-child(odd) { justify-content: flex-start; padding-left: 5%; }
  
  .ctd-node:nth-child(even) .node-card { transform: rotate(1deg); }
  .ctd-node:nth-child(odd) .node-card { transform: rotate(-1deg); }

  /* Side panel becomes bottom section */
  .side-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid #eee;
  }

  /* 📱 MOBILE NAVIGATION BAR (Image 3 Bottom) */
  .mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
  }

  .nav-item.active { color: #e11d48; }

  .nav-icon { font-size: 1.4rem; }
}

/* Fix for desktop grid in image 1 */
@media (min-width: 1201px) {
  .discovery-grid { grid-template-columns: repeat(5, 1fr); }
}