/* ============================================================
   NARIMITRA — cards.css
   Shared styles for find-jobs.html and find-candidates.html
   Replaces: discover.css + jobs.css
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */

:root {
    --plum:          #4A3267; /* Synced with main ecosystem plum */
    --plum-dark:     #35224A;
    --rose:          #DE638A; /* Synced with main ecosystem rose */
    --coral:         #E8928B;
    --soft:          #FFF4F7;
    --bg:            #F7F1FA;
    --white:         #ffffff;
    --card-w:        320px;   /* Adjusted to match standard layout dimensions */
    --card-h:        540px;   /* Adjusted to give contents breathing room */
}

/* ============================================================
   HERO SECTION
   NOTE: background-image is set inline on each page so one
   CSS file can serve both pages with different banners.
   ============================================================ */

.hero-jobs {
    width: 100%;
    aspect-ratio: 1920 / 600;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */

.discover-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 18px;
}

/* ============================================================
   GRID SYSTEM
   — Mobile:  3 compact columns
   — Tablet:  4 columns  (≥ 600px)
   — Desktop: 6 columns  (≥ 1024px)
   Using minmax so cards never stretch absurdly wide.
   ============================================================ */

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 160px));
    justify-content: center;
    gap: 12px;
}

@media (min-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(4, minmax(0, 160px));
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(6, minmax(0, 160px));
        gap: 18px;
    }
}

/* ============================================================
   MINI CARD
   ============================================================ */

.mini-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    border: 2px solid transparent;
    box-shadow: 0 6px 16px rgba(74, 50, 103, 0.10);
}

.mini-card:hover {
    transform: translateY(-5px);
    border-color: var(--rose);
    box-shadow: 0 14px 28px rgba(74, 50, 103, 0.18);
}

/* ============================================================
   MINI PHOTO
   ============================================================ */

.mini-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--plum);
    overflow: hidden;
}

.mini-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   MINI CONTENT
   ============================================================ */

.mini-content {
    padding: 10px 10px 12px;
    text-align: center;
}

/* ============================================================
   NAME + AGE ROW
   ============================================================ */

.mini-name-age {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.mini-name-age h3 {
    margin: 0;
    font-size: 13px;
    color: var(--plum);
    font-weight: 800;
    line-height: 1.3;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-name-age span {
    background: var(--soft);
    color: var(--rose);
    border-radius: 10px;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   ROLE / JOB TITLE
   ============================================================ */

.mini-role {
    font-size: 12px;
    color: #444;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   META ITEMS  (experience + location)
   ============================================================ */

.mini-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fdf8ff;
    border: 1px solid #f0e6ff;
    border-radius: 10px;
    padding: 4px 8px;
}

.meta-item img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.meta-item span {
    font-size: 10px;
    color: #666;
    font-weight: 600;
}

/* ============================================================
   SALARY BAR
   ============================================================ */

.mini-salary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: #faf8ff;
    border-radius: 12px;
    padding: 6px 10px;
}

.mini-salary img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.mini-salary span {
    color: var(--plum);
    font-size: 11px;
    font-weight: 700;
}

/* ============================================================
   OVERLAY  (blurred backdrop when card is open)
   ============================================================ */

.swipe-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 24, 64, 0.75); /* Plum-tinted backdrop tint */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

/* ============================================================
   TINDER STACK  — FIXED STACK LAYOUT ENGINE
   ============================================================ */

.tinder-stack {
    position: relative; /* Acts as the absolute tracking anchor for children */
    width: var(--card-w);           
    height: var(--card-h);          
    margin: 40px auto;
    perspective: 1200px;
    max-width: calc(100vw - 40px);
}

@media (max-width: 600px) {
    .tinder-stack {
        width: min(90vw, 320px);
        height: var(--card-h);
    }
}

/* ============================================================
   FLIP SYSTEM
   ============================================================ */

.card-inner {
    position: absolute; /* Forced to absolute to allow layout piling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

/* Trigger class toggled by JS */
.card-inner.flip {
    transform: rotateY(180deg);
}

/* ============================================================
   CARD FRONT + BACK  (shared base)
   ============================================================ */

.card-front,
.card-back {
    position: absolute;
    inset: 0;                       
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 15px 35px rgba(74, 50, 103, 0.2);
    box-sizing: border-box;
}

/* ============================================================
   CARD FRONT
   ============================================================ */

.card-front {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   BIG PHOTO
   ============================================================ */

.swipe-photo {
    width: 100%;
    height: 45%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: var(--plum);
    border-bottom: 3px solid var(--plum);
}

/* ============================================================
   INFO SECTION
   ============================================================ */

.swipe-info {
    flex: 1;
    min-height: 0;          
    padding: 15px 20px 5px;
    text-align: center;
    overflow: hidden;
}

.swipe-info h2 {
    margin: 0;
    font-size: 24px;
    color: var(--plum);
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-role {
    color: var(--rose);
    font-weight: 700;
    margin: 6px 0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   DETAIL TAGS
   ============================================================ */

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.detail-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--soft);
    border-radius: 20px;
    padding: 6px 12px;
    min-width: 0;
}

.detail-tag img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.detail-tag span {
    font-size: 11px;
    color: #444;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   FLIP HINT TEXT
   ============================================================ */

.flip-text {
    font-size: 11px;
    color: #bbb;
    margin-top: 12px;
}

/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.swipe-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 10px 20px;
    flex-shrink: 0;             
    background: #faf8ff;
    border-top: 1px solid #f0e6ff;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.action-btn:hover {
    transform: scale(1.15);
}

.action-btn img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
}

.action-btn span {
    font-size: 11px;
    font-weight: 700;
    color: var(--plum);
};

/* ============================================================
   CARD BACK
   ============================================================ */

.card-back {
    transform: rotateY(180deg);
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   BACK HEADER
   ============================================================ */

.resume-header {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.resume-header h3 {
    margin: 0;
    color: var(--plum);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.resume-header p {
    margin: 4px 0 0;
    color: var(--rose);
    font-size: 13px;
    font-weight: 700;
}

/* ============================================================
   SCROLLABLE CONTENT WINDOW
   ============================================================ */

.jd-scroll {
    flex: 1;
    min-height: 0;          
    overflow-y: auto;
    padding-right: 6px;
    font-size: 13px;
    line-height: 1.8;
    color: #444;
}

.jd-scroll::-webkit-scrollbar {
    width: 4px;
}

.jd-scroll::-webkit-scrollbar-thumb {
    background: var(--rose);
    border-radius: 20px;
}

/* ============================================================
   MOBILE OVERRIDES (≤ 600px)
   ============================================================ */

@media (max-width: 600px) {
    .mini-name-age h3 { font-size: 11px; }
    .mini-role { font-size: 11px; }
    .swipe-info h2 { font-size: 20px; }
    .action-btn img { width: 40px; height: 40px; }
}