/*
 * entrance-detail.css — CareerZoneHub
 * Entrance Exam Detail Page — Mobile-first, indigo theme
 */

/* ══════════════════════════════════════
   READING PROGRESS BAR
══════════════════════════════════════ */
.ed-progress-track {
    position: fixed;
    top: 60px; /* below header */
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(99,102,241,0.15);
    z-index: 999;
}

.ed-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4f46e5, #818cf8);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ══════════════════════════════════════
   WRAPPER
══════════════════════════════════════ */
.ed-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 60px;
}

@media (min-width: 640px)  { .ed-wrap { padding: 0 16px 60px; } }
@media (min-width: 1024px) { .ed-wrap { padding: 0 0 60px; } }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.ed-hero {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 55%, #6366f1 100%);
    color: #fff;
    padding: 36px 16px 44px;
    position: relative;
    overflow: hidden;
}

.ed-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 28px;
    background: #f8fafc;
    clip-path: ellipse(55% 100% at 50% 100%);
}

.ed-hero-ongoing  { background: linear-gradient(135deg, #065f46 0%, #059669 55%, #10b981 100%); }
.ed-hero-upcoming { background: linear-gradient(135deg, #92400e 0%, #d97706 55%, #fbbf24 100%); }
.ed-hero-closed   { background: linear-gradient(135deg, #1e293b 0%, #334155 55%, #475569 100%); }

.ed-hero-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.ed-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}

.ed-shape-1 { width: 340px; height: 340px; top: -100px; right: -60px; }
.ed-shape-2 { width: 180px; height: 180px; bottom: -40px; left: -40px; }

.ed-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}

/* Badges */
.ed-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
}

.ed-badge-type   { background: rgba(255,255,255,0.15); color: #fff; }
.ed-badge-views  { background: rgba(255,255,255,0.1);  color: rgba(255,255,255,0.88); }

.ed-badge-status { font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.ed-status-ongoing  { background: #059669; border-color: #34d399; }
.ed-status-upcoming { background: #d97706; border-color: #fcd34d; color: #fff; }
.ed-status-closed   { background: #475569; border-color: #94a3b8; }

/* Title */
.ed-hero-title {
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Org */
.ed-hero-org {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    margin-bottom: 18px;
    max-width: 100%;
    word-break: break-word;
}

/* Countdown */
.ed-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ed-count-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.ed-count-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.ed-count-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

.ed-count-sep {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    padding-bottom: 8px;
}

.ed-count-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    white-space: nowrap;
}

/* Date pills */
.ed-hero-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.ed-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
}

.ed-date-pill strong { color: #fff; }
.pill-urgent { background: rgba(239,68,68,0.3); border-color: #fca5a5; }

/* CTA buttons */
.ed-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ed-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.ed-cta-primary  { background: #fff; color: #4f46e5; }
.ed-cta-primary:hover  { background: #ede9fe; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }

.ed-cta-secondary { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }
.ed-cta-secondary:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

.ed-cta-outline { background: transparent; color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.35); }
.ed-cta-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

@media (max-width: 479px) {
    .ed-cta-btn { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════
   TABS BAR
══════════════════════════════════════ */
.ed-tabs-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 60px;
    z-index: 40;
    margin: 0 -16px;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .ed-tabs-bar { margin: 0; padding: 0; }
}

.ed-tabs-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
    width: max-content;
    max-width: 100%;
}

.ed-tabs-scroll::-webkit-scrollbar { display: none; }

.ed-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: transparent;
    border: none;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ed-tab:hover  { background: #ede9fe; color: #4f46e5; }
.ed-tab.active { background: #4f46e5; color: #fff; }
.ed-tab i      { font-size: 0.78rem; }

/* ══════════════════════════════════════
   CONTENT AREA
══════════════════════════════════════ */
.ed-content {
    padding: 20px 0 0;
}

.ed-tab-panel {
    display: none;
    animation: edFadeIn 0.25s ease;
}

.ed-tab-panel.active { display: block; }

@keyframes edFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   CONTENT CARDS
══════════════════════════════════════ */
.ed-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    overflow: hidden;
}

.ed-card-warning { border-left: 4px solid #f59e0b; }

.ed-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.ed-card-head i {
    width: 34px;
    height: 34px;
    background: #ede9fe;
    color: #4f46e5;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.ed-card-warning .ed-card-head i {
    background: #fef3c7;
    color: #d97706;
}

.ed-card-head h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

@media (min-width: 640px) {
    .ed-card-head { padding: 16px 20px; }
    .ed-card-head h2 { font-size: 1.1rem; }
}

/* ══════════════════════════════════════
   RICH TEXT CONTENT
══════════════════════════════════════ */
.ed-rich {
    padding: 16px;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.75;
    word-break: break-word;
    overflow-x: auto;
}

@media (min-width: 640px) { .ed-rich { padding: 20px; font-size: 0.92rem; } }

.ed-rich p   { margin-bottom: 0.9rem; }
.ed-rich p:last-child { margin-bottom: 0; }

.ed-rich h2, .ed-rich h3 {
    font-weight: 700;
    color: #0f172a;
    margin: 1.2rem 0 0.5rem;
}

.ed-rich h2 {
    font-size: 1.05rem;
    border-left: 3px solid #4f46e5;
    padding-left: 12px;
}

.ed-rich h3 { font-size: 0.95rem; }

.ed-rich ul, .ed-rich ol {
    padding-left: 1.4rem;
    margin-bottom: 0.9rem;
}

.ed-rich li { margin-bottom: 0.35rem; }

.ed-rich strong, .ed-rich b { color: #0f172a; }

/* Tables */
.ed-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.ed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
    min-width: 400px;
}

.ed-table th {
    background: #ede9fe;
    color: #3730a3;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
}

.ed-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.ed-table tr:last-child td { border-bottom: none; }
.ed-table tr:nth-child(even) td { background: #fafbfc; }

/* Notice box */
.ed-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #ede9fe;
    color: #3730a3;
    font-size: 0.88rem;
    font-weight: 500;
}

.ed-notice i { font-size: 1rem; flex-shrink: 0; }

/* ══════════════════════════════════════
   FEE TAB
══════════════════════════════════════ */
.ed-fee-grid { padding: 0; }

.ed-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    gap: 10px;
}

.ed-fee-row:last-child { border-bottom: none; }

.fee-cat {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.fee-amt {
    font-size: 0.85rem;
    color: #4f46e5;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   DATES TAB
══════════════════════════════════════ */
.ed-dates-list { padding: 0; }

.ed-date-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.ed-date-row:last-child { border-bottom: none; }
.ed-date-row:hover { background: #fafbfc; }

.ed-date-row.date-urgent {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.ed-date-row.date-urgent .ed-date-val strong { color: #dc2626; }

.ed-date-icon {
    width: 32px;
    height: 32px;
    background: #ede9fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ed-date-label {
    flex: 1;
    font-size: 0.87rem;
    color: #475569;
    font-weight: 500;
}

.ed-date-val {
    font-size: 0.87rem;
    color: #0f172a;
    text-align: right;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   APPLY TAB
══════════════════════════════════════ */
.ed-apply-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f1f5f9;
}

.ed-apply-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    transition: background 0.2s;
}

.ed-apply-card:hover { background: #fafbfc; }

.ed-apply-card > .fa-arrow-right {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.ed-apply-card:hover > .fa-arrow-right { transform: translateX(3px); color: inherit; }

.ed-apply-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.ed-apply-primary .ed-apply-icon  { background: linear-gradient(135deg, #4f46e5, #3730a3); }
.ed-apply-info    .ed-apply-icon  { background: linear-gradient(135deg, #0284c7, #075985); }
.ed-apply-warning .ed-apply-icon  { background: linear-gradient(135deg, #d97706, #b45309); }

.ed-apply-card > div:nth-child(2) strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
}

.ed-apply-card > div:nth-child(2) span {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.ed-apply-primary > div:nth-child(2) strong { color: #4f46e5; }
.ed-apply-info    > div:nth-child(2) strong { color: #0284c7; }
.ed-apply-warning > div:nth-child(2) strong { color: #d97706; }

.mt-4 { margin-top: 20px; }

/* Steps */
.ed-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
}

.ed-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ed-step:last-child { border-bottom: none; }

.ed-step-num {
    width: 28px;
    height: 28px;
    background: #4f46e5;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ed-step-body { flex: 1; }
.ed-step-body strong { display: block; font-size: 0.92rem; color: #0f172a; margin-bottom: 3px; }
.ed-step-body p { font-size: 0.82rem; color: #64748b; margin: 0; line-height: 1.5; }

/* ══════════════════════════════════════
   SHARE
══════════════════════════════════════ */
.ed-share-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ed-share-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    flex-shrink: 0;
}

.ed-share-head i { color: #4f46e5; }

.ed-share-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ed-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.88;
}

.ed-share-btn:hover { opacity: 1; transform: translateY(-3px); }

.ed-share-fb { background: #1877f2; }
.ed-share-tw { background: #1da1f2; }
.ed-share-wa { background: #25d366; }
.ed-share-tg { background: #0088cc; }
.ed-share-cp { background: #64748b; }
.ed-share-cp-success { background: #10b981 !important; }

/* ══════════════════════════════════════
   RELATED EXAMS
══════════════════════════════════════ */
.ed-related { margin-top: 28px; }

.ed-related-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.ed-related-head i { color: #4f46e5; font-size: 1.1rem; }

.ed-related-head h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.ed-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

@media (max-width: 639px) {
    .ed-related-grid { grid-template-columns: 1fr; gap: 10px; }
}

.ed-rel-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.ed-rel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.09);
    border-color: #a5b4fc;
}

.ed-rel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ed-rel-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #4f46e5;
    background: #ede9fe;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ed-rel-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
}

.ed-rel-ongoing  { background: #d1fae5; color: #065f46; }
.ed-rel-upcoming { background: #fef3c7; color: #92400e; }
.ed-rel-closed   { background: #f3f4f6; color: #6b7280; }

.ed-rel-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ed-rel-title a { color: inherit; text-decoration: none; }
.ed-rel-title a:hover { color: #4f46e5; }

.ed-rel-org, .ed-rel-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
}

.ed-rel-org i, .ed-rel-date i { color: #a5b4fc; font-size: 0.72rem; }

.ed-rel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    background: #ede9fe;
    color: #4f46e5;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    transition: all 0.2s;
}

.ed-rel-btn:hover { background: #4f46e5; color: #fff; }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.ed-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #0f172a;
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.ed-toast.ed-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}