/* LEVTRON INSTRUMENTS - APPLICATION PAGE STYLESHEET (application.css) */
/* Custom Styling for Application Page */
    /* Grid layout for 3 cards per row */
    #appGrid {
      display: grid !important;
      grid-template-columns: repeat(3, 1fr) !important;
      gap: 2rem !important;
    }

    .app-card-item {
      height: 100%;
    }

    @media (max-width: 1024px) {
      #appGrid {
        grid-template-columns: repeat(2, 1fr) !important;
      }
    }

    @media (max-width: 640px) {
      #appGrid {
        grid-template-columns: 1fr !important;
      }
    }

    .app-card {
      background: #ffffff;
      border-radius: 18px;
      border: 1px solid #e2e8f0;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
      transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .app-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 22px 45px rgba(14, 165, 233, 0.15);
      border-color: rgba(56, 189, 248, 0.5);
    }

    .app-card-img-wrap {
      position: relative;
      width: 100%;
      height: 200px;
      background: #0b1528;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .app-card-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.6s ease;
    }

    .app-card:hover .app-card-img {
      transform: scale(1.06);
    }

    .app-badge {
      position: absolute;
      top: 14px;
      left: 14px;
      background: rgba(11, 21, 40, 0.88);
      backdrop-filter: blur(8px);
      color: #38bdf8;
      font-size: 0.75rem;
      font-weight: 700;
      padding: 0.35rem 0.85rem;
      border-radius: 20px;
      border: 1px solid rgba(56, 189, 248, 0.35);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      z-index: 2;
    }

    .app-card-body {
      padding: 1.75rem;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
    }

    .app-card-title {
      font-size: 1.22rem;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 0.75rem;
      line-height: 1.4;
    }

    .app-card-text {
      color: #64748b;
      font-size: 0.93rem;
      line-height: 1.6;
      margin-bottom: 1.25rem;
      flex-grow: 1;
    }

    .app-recommended-box {
      background: #f8fafc;
      border-radius: 12px;
      padding: 0.85rem 1rem;
      margin-bottom: 1.25rem;
      border-left: 3px solid var(--primary-cyan);
    }

    .app-recommended-label {
      font-size: 0.72rem;
      font-weight: 700;
      color: #0b1528;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 0.35rem;
    }

    .app-recommended-name {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--color-blue);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .app-filter-btn {
      border-radius: 30px;
      font-weight: 600;
      padding: 0.55rem 1.4rem;
      font-size: 0.9rem;
      transition: all 0.25s ease;
      cursor: pointer;
    }

    .app-filter-btn.active {
      background: #0b1528;
      color: #38bdf8;
      border-color: #38bdf8;
      box-shadow: 0 4px 15px rgba(11, 21, 40, 0.2);
    }

    /* Application Detail Modal */
    .app-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(11, 21, 40, 0.85);
      backdrop-filter: blur(8px);
      z-index: 9999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
    }

    /* Universal Quote Modal: Ensure it renders directly in front of Application Detail Modal */
    #quoteModal,
    .modal-backdrop#quoteModal {
      z-index: 100005 !important;
    }

    .app-modal-card {
      background: #ffffff;
      border-radius: 20px;
      max-width: 850px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
      position: relative;
      animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes modalSlideIn {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .app-modal-close {
      position: absolute;
      top: 1.25rem;
      right: 1.25rem;
      width: 38px;
      height: 38px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      color: #0b1528;
      cursor: pointer;
      z-index: 10;
      border: 1px solid #cbd5e1;
      transition: all 0.2s ease;
    }

    .app-modal-close:hover {
      background: #0b1528;
      color: #38bdf8;
    }

    .app-modal-header {
      background: #0b1528;
      color: #ffffff;
      padding: 2.25rem 2.5rem 1.75rem;
      border-radius: 20px 20px 0 0;
      position: relative;
    }

    .app-modal-body {
      padding: 2.25rem 2.5rem;
    }

    .challenge-pill {
      background: #f1f5f9;
      color: #334155;
      padding: 0.5rem 1rem;
      border-radius: 8px;
      font-size: 0.88rem;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-right: 0.5rem;
      margin-bottom: 0.5rem;
    }

    @media (max-width: 768px) {
      .app-modal-header {
        padding: 1.5rem 1.25rem 1rem;
      }

      .app-modal-body {
        padding: 1.5rem 1.25rem;
      }

      .app-modal-card {
        max-width: 95vw;
        border-radius: 14px;
      }

      .app-filter-btn {
        padding: 0.45rem 1rem;
        font-size: 0.84rem;
      }
    }

    @media (max-width: 480px) {
      .app-modal-header {
        padding: 1.25rem 1rem 0.75rem;
      }

      .app-modal-body {
        padding: 1.25rem 1rem;
      }

      .app-card-body {
        padding: 1.25rem 1rem;
      }
    }
