/* =========================================================================
   Dr. Sam — modern layer for inner pages
   Course detail + materials, study library, student dashboard, checkout,
   auth and blog post. Loaded after modern.css. Restyles existing classes only.
   ========================================================================= */

/* ---------- Shared glass surface ---------- */
.course-summary-main,
.course-access,
.material-board,
.sd-card,
.library-status,
.resource-card,
.lesson-card,
.file-rows li {
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: var(--site-shadow);
}

/* Tinted icon chips (were teal) */
.sd-plan-card-icon,
.resource-card-icon,
.sd-library-list i,
.file-list-icon,
.file-rows-icon,
.course-access-icon,
.library-status-icon,
.sd-stat-icon--teal {
    background: linear-gradient(140deg, var(--site-skyfog), var(--site-lavender));
    color: var(--site-primary);
}

.sd-plan-badge--active,
.sd-status-pill--paid,
.library-pill--open,
.resource-action--open,
.library-status--open {
    background: rgba(10, 140, 140, .1);
    color: var(--site-primary);
}

/* ---------- Course detail ---------- */
.course-detail {
    position: relative;
}

.course-summary {
    gap: 22px;
    margin-bottom: 28px;
}

.course-summary-main {
    gap: 26px;
    padding: 16px;
    align-items: center;
    border-radius: var(--site-radius-xl);
}

.course-summary-thumb {
    border-radius: var(--site-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px -24px rgba(11, 59, 74, .5);
}

.course-summary-thumb img {
    transition: transform 1.2s var(--site-ease);
}

.course-summary:hover .course-summary-thumb img {
    transform: scale(1.05);
}

.course-summary-copy .course-category {
    color: var(--site-primary);
}

.course-summary-copy h2 {
    font-weight: 600;
    letter-spacing: -.03em;
}

.course-summary-copy p {
    color: var(--site-muted);
}

.course-summary-stats button {
    padding: 8px 16px;
    border: 1px solid rgba(10, 140, 140, .16);
    border-radius: 999px;
    background: #fff;
    color: var(--site-primary);
    font-weight: 600;
    transition: background .3s ease, color .3s ease, transform .4s var(--site-ease), box-shadow .3s ease;
}

.course-summary-stats button:hover {
    background: var(--site-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(10, 140, 140, .8);
}

.course-access {
    padding: 22px;
    border-radius: var(--site-radius-lg);
    background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(227, 239, 253, .9));
}

.course-access--active {
    background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(226, 244, 234, .95));
    border-color: rgba(255, 255, 255, .95);
}

.course-access--active .course-access-icon {
    background: linear-gradient(140deg, #d4f2e1, #b8ead0);
    color: #1f8a55;
}

.course-access-icon {
    position: relative;
    border-radius: 16px;
}

.course-access-icon::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 20px;
    border: 1.5px solid currentColor;
    opacity: .3;
    animation: mx-ring 2.6s ease-out infinite;
}

.course-access h2 {
    font-weight: 600;
}

.material-board {
    margin-top: 28px;
    padding: clamp(16px, 3vw, 28px);
    border-radius: var(--site-radius-xl);
}

.material-toolbar {
    gap: 14px;
}

.material-tabs,
.material-filters {
    padding: 5px;
    border-radius: 999px;
    background: var(--site-surface-alt);
}

.material-tab,
.material-filters button {
    border-radius: 999px;
    font-weight: 600;
    color: var(--site-text);
    transition: background .35s var(--site-ease), color .3s ease, box-shadow .35s ease;
}

.material-tab.is-active,
.material-filters button.is-active {
    background: var(--site-gradient);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(10, 140, 140, .7);
}

.lesson-grid {
    gap: 20px;
}

.lesson-card {
    padding: 10px 10px 16px;
    border-radius: var(--site-radius-lg);
    transition: transform .5s var(--site-ease), box-shadow .5s var(--site-ease);
}

.lesson-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--site-shadow-lg);
}

.lesson-thumb {
    border-radius: calc(var(--site-radius-lg) - 6px);
    overflow: hidden;
    background: linear-gradient(140deg, #0b3b4a, #0a8c8c);
}

.lesson-thumb img {
    transition: transform 1s var(--site-ease);
}

.lesson-card:hover .lesson-thumb img {
    transform: scale(1.07);
}

.lesson-play {
    background: rgba(255, 255, 255, .92);
    color: var(--site-primary);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .6);
    animation: mx-play-pulse 2.2s ease-out infinite;
    transition: transform .4s var(--site-ease);
}

.lesson-card:hover .lesson-play {
    transform: scale(1.18);
}

.lesson-card h3 {
    padding: 0 6px;
    font-weight: 600;
}

.lesson-card p {
    padding: 0 6px;
    color: var(--site-muted);
}

.lesson-flag {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .06em;
}

.lesson-flag--free {
    background: #dcfce7;
    color: #166534;
}

.lesson-flag--locked {
    background: #fff1e8;
    color: #c2410c;
}

.file-rows {
    gap: 12px;
}

.file-rows li {
    border-radius: var(--site-radius-lg);
    transition: transform .45s var(--site-ease), box-shadow .45s var(--site-ease);
}

.file-rows li:hover {
    transform: translateX(6px);
    box-shadow: var(--site-shadow-lg);
}

.file-rows-icon {
    border-radius: 14px;
}

.file-open {
    border-radius: 999px;
    border: 1px solid rgba(10, 140, 140, .25);
    color: var(--site-primary);
    font-weight: 600;
    transition: background .3s ease, color .3s ease;
}

.file-open:hover {
    background: var(--site-primary);
    color: #fff;
}

.file-open--locked {
    border-color: var(--site-border);
    color: var(--site-muted);
}

.video-modal-backdrop {
    background: rgba(5, 40, 48, .7);
}

.video-modal-dialog {
    border-radius: var(--site-radius-lg);
    overflow: hidden;
    animation: mx-pop-in .5s var(--site-ease);
}

.video-modal-close {
    border-radius: 50%;
    transition: transform .4s var(--site-ease), background .3s ease;
}

.video-modal-close:hover {
    transform: rotate(90deg);
}

.library-empty {
    padding: 26px;
    border-radius: var(--site-radius-lg);
    border: 1px dashed rgba(10, 140, 140, .25);
    background: rgba(255, 255, 255, .6);
    color: var(--site-muted);
    text-align: center;
}

/* ---------- Study library / resources ---------- */
.library-status {
    border-radius: var(--site-radius-xl);
    padding: 26px 28px;
}

.library-status--locked {
    background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(253, 235, 226, .9));
}

.library-status-icon {
    border-radius: 18px;
}

.library-filters {
    gap: 10px;
}

.library-filters .form-control-custom {
    border-radius: 999px;
}

.resource-card {
    padding: 28px;
    border-radius: var(--site-radius-lg);
    transition: transform .5s var(--site-ease), box-shadow .5s var(--site-ease);
}

a.resource-card,
a.library-card {
    color: inherit;
    text-decoration: none;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--site-shadow-lg);
}

.resource-card-icon {
    border-radius: 18px;
    transition: transform .6s var(--site-ease);
}

.resource-card:hover .resource-card-icon {
    transform: rotate(-8deg) scale(1.08);
}

.resource-title {
    font-weight: 600;
}

.resource-desc {
    color: var(--site-muted);
}

.resource-action {
    border-radius: 999px;
    font-weight: 600;
}

.resource-badge {
    border-radius: 999px;
}

/* ---------- Student dashboard ---------- */
.sd-banner {
    text-align: left;
    padding: clamp(50px, 7vw, 90px) 0;
}

.sd-eyebrow {
    margin-bottom: 1rem;
}

.sd-welcome {
    color: var(--site-heading);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -.045em;
}

.sd-welcome-sub {
    color: var(--site-primary);
    font-weight: 600;
}

.sd-welcome-note {
    max-width: 560px;
    color: var(--site-muted);
}

.sd-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid rgba(10, 140, 140, .2);
    background: rgba(255, 255, 255, .8);
    color: var(--site-heading);
    font-weight: 600;
    transition: background .3s ease, color .3s ease, transform .4s var(--site-ease);
}

.sd-logout-btn:hover {
    background: var(--site-heading);
    color: #fff;
    transform: translateY(-2px);
}

.sd-section {
    background: none;
}

.sd-card {
    padding: clamp(22px, 3vw, 32px);
    border-radius: var(--site-radius-xl);
}

.sd-plan-card {
    position: relative;
    overflow: hidden;
}

.sd-plan-card::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--site-gradient-soft);
    animation: mx-breathe 10s ease-in-out infinite;
}

.sd-plan-card > * {
    position: relative;
}

.sd-plan-card-icon {
    border-radius: 18px;
}

.sd-card-title,
.sd-plan-name {
    font-weight: 600;
    letter-spacing: -.03em;
}

.sd-plan-price {
    font-family: var(--site-font-heading);
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--site-heading);
}

.sd-card-link {
    color: var(--site-primary);
    font-weight: 600;
}

.sd-library-list a {
    border-radius: 16px;
    transition: background .3s ease, transform .4s var(--site-ease);
}

.sd-library-list a:hover {
    background: rgba(10, 140, 140, .06);
    transform: translateX(6px);
}

.sd-library-list i {
    border-radius: 12px;
}

.sd-lib-state {
    border-radius: 999px;
}

.sd-lib-state--open {
    background: #dcfce7;
    color: #166534;
}

.sd-table {
    border-collapse: separate;
    border-spacing: 0;
}

.sd-table th {
    background: var(--site-surface-alt);
    color: var(--site-heading);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sd-table th:first-child {
    border-radius: 12px 0 0 12px;
}

.sd-table th:last-child {
    border-radius: 0 12px 12px 0;
}

.sd-table tbody tr {
    transition: background .3s ease;
}

.sd-table tbody tr:hover {
    background: rgba(10, 140, 140, .04);
}

.sd-status-pill {
    border-radius: 999px;
}

/* ---------- Checkout / auth ---------- */
.checkout-price-note,
.checkout-pay-note {
    color: var(--site-muted);
}

.contact-form-wrap .btn-hero-primary.w-100 {
    padding-block: 1.05rem;
}

/* ---------- Blog post ---------- */
.prose-wide {
    font-size: 1.06rem;
}

.prose-wide > p:first-of-type::first-letter {
    float: left;
    margin: .1em .12em 0 0;
    font-family: var(--site-font-accent);
    font-size: 3.6em;
    line-height: .8;
    color: var(--site-primary);
}

/* ---------- Keyframes used only here ---------- */
@keyframes mx-play-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
    80%, 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
}

@keyframes mx-pop-in {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 767.98px) {
    .course-summary-main {
        flex-direction: column;
        align-items: stretch;
    }

    .sd-banner {
        text-align: center;
    }

    .sd-banner-row {
        flex-direction: column;
        align-items: center;
    }
}
