/* ── EKGLab Home / Landing Page Styles ─────────────────────────── */

/* Page layout */
.home-main {
    margin-left: 256px; /* 64 * 4 = sidebar width */
    padding: 88px 32px 48px; /* top: below fixed header */
    min-height: 100vh;
    background: #f7fafe;
}

/* Welcome header */
.home-welcome {
    margin-bottom: 8px;
}
.home-welcome-greeting {
    font-size: 1.75rem;
    font-weight: 700;
    color: #181c1f;
    line-height: 1.2;
}
.home-welcome-sub {
    margin-top: 6px;
    font-size: 0.9375rem;
    color: #707882;
}
.home-user-name {
    color: #26408b;
}

/* Section titles */
.home-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ea6b0;
    margin: 32px 0 14px;
}

/* Nav card grid */
.home-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* Individual nav card */
.home-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, #26408b);
    border-radius: 16px 16px 0 0;
}
.home-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
    border-color: #c8d0e0;
    text-decoration: none;
    color: inherit;
}
.home-card.home-card-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

/* Card accent colours per section */
.home-card-ecg    { --card-accent: #26408b; }
.home-card-sim    { --card-accent: #c2e7d9; }
.home-card-mitbih { --card-accent: #a6cfd5; }
.home-card-vfdb   { --card-accent: #e05252; }
.home-card-ptbxl  { --card-accent: #4d9b7b; }
.home-card-quiz   { --card-accent: #f4c542; }
.home-card-future { --card-accent: #b0b8c6; }

/* Card icon area */
.home-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(38, 64, 139, 0.08);
    color: #26408b;
    margin-bottom: 16px;
    font-size: 22px;
    flex-shrink: 0;
}
.home-card-sim    .home-card-icon { background: rgba(194, 231, 217, 0.30); color: #2a8a6a; }
.home-card-quiz   .home-card-icon { background: rgba(244, 197,  66, 0.18); color: #d4a800; }
.home-card-mitbih .home-card-icon { background: rgba(166, 207, 213, 0.18); color: #26a4b5; }
.home-card-vfdb   .home-card-icon { background: rgba(224, 82, 82, 0.10);  color: #c0392b; }
.home-card-ptbxl  .home-card-icon { background: rgba(77, 155, 123, 0.12); color: #3a7d62; }
.home-card-future .home-card-icon { background: rgba(160, 168, 180, 0.15); color: #9ea6b0; }

/* Card text */
.home-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #181c1f;
    margin-bottom: 6px;
    line-height: 1.3;
}
.home-card-desc {
    font-size: 0.8125rem;
    color: #707882;
    line-height: 1.5;
    flex: 1;
}
.home-card-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #9ea6b0;
    background: #f1f4f8;
    border-radius: 100px;
    padding: 3px 9px;
    width: fit-content;
}
.home-card-badge-soon {
    background: #f1f4f8;
    color: #b0b8c6;
}

/* Responsive */
@media (max-width: 768px) {
    .home-main {
        margin-left: 0;
        padding: 80px 16px 48px;
    }
    .home-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Feature carousels (Apple "The latest" style) ─────────────────── */

.home-feature-section {
    margin-top: 32px;
}

.home-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-right: 4px;
}
.home-feature-header .home-section-title {
    margin: 0;
}

.home-feature-nav {
    display: flex;
    gap: 8px;
}

.home-feature-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d8dde3;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #404750;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.home-feature-arrow:hover {
    background: #fff;
    border-color: #b0b8c6;
    color: #181c1f;
}
.home-feature-arrow:disabled {
    opacity: 0.32;
    cursor: default;
}
.home-feature-arrow .material-symbols-outlined {
    font-size: 22px;
}

.home-feature-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Negative margin lets the rightmost card peek past the page padding */
    margin-right: -32px;
    padding-right: 32px;
    padding-bottom: 8px;
}
.home-feature-track::-webkit-scrollbar { display: none; }

.home-feature-card {
    flex: 0 0 340px;
    height: 500px;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e8eaed;
    padding: 28px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}
.home-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05), 0 16px 40px rgba(0, 0, 0, 0.10);
    border-color: #c8d0e0;
    text-decoration: none;
    color: inherit;
}

.home-feature-card-dark {
    background:
        radial-gradient(ellipse 75% 55% at 100% 0%, rgba(166, 207, 213, 0.12), rgba(166, 207, 213, 0) 70%),
        #0d0221;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.18);
}
.home-feature-card-dark:hover {
    background:
        radial-gradient(ellipse 75% 55% at 100% 0%, rgba(166, 207, 213, 0.18), rgba(166, 207, 213, 0) 70%),
        #0d0221;
    border-color: rgba(255, 255, 255, 0.16);
    color: #f5f5f5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16), 0 16px 40px rgba(0, 0, 0, 0.30);
}

.home-feature-card-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.home-feature-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.home-feature-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c0392b;
    margin-bottom: 4px;
}
.home-feature-card-dark .home-feature-tag { color: #a6cfd5; }

.home-feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: #181c1f;
    margin: 0;
}
.home-feature-card-dark .home-feature-title { color: #ffffff; }

.home-feature-sub {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #404750;
    margin: 4px 0 0;
}
.home-feature-card-dark .home-feature-sub { color: #c8cdd3; }

.home-feature-meta {
    font-size: 0.78rem;
    color: #707882;
    margin: 10px 0 0;
    font-variant-numeric: tabular-nums;
}
.home-feature-card-dark .home-feature-meta { color: #9aa3af; }

.home-feature-hero {
    flex: 1;
    margin: 0 -14px -14px;
    background: transparent;
    position: relative;
    overflow: hidden;
    min-height: 0;
    border-radius: 8px;
}

.home-feature-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.home-feature-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 96px;
    color: rgba(255, 255, 255, 0.25);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    user-select: none;
}

@media (max-width: 768px) {
    .home-feature-card {
        flex: 0 0 280px;
        height: 440px;
        padding: 22px;
    }
    .home-feature-title { font-size: 1.3rem; }
    .home-feature-nav { display: none; }
    .home-feature-track {
        margin-right: -16px;
        padding-right: 16px;
    }
    .home-feature-hero { margin: 0 -11px -11px; }
}
