/* ================================================================
   RS Trainer Module — trainer.css
   Carousel + Single Profile Page styles
   ================================================================ */

/* ── Google Fonts (loaded via CSS for portability) ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');

/* ── Reset (scoped) ─────────────────────────────────────────────── */
.rstm-section *,
.rstm-section *::before,
.rstm-section *::after,
.rstm-profile-page *,
.rstm-profile-page *::before,
.rstm-profile-page *::after {
    box-sizing: border-box;
}

/* ================================================================
   CAROUSEL SECTION
   ================================================================ */

.rstm-section {
    background: #F0F4F8;
    padding: 80px 20px 90px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    position: relative;
}

/* ── Header ──────────────────────────────────────────────────────── */
.rstm-header {
    text-align: center;
    margin-bottom: 56px;
}

.rstm-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #C8922A;
    margin-bottom: 14px;
    position: relative;
}

.rstm-eyebrow::before,
.rstm-eyebrow::after {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1.5px;
    background: #C8922A;
    vertical-align: middle;
    margin: 0 10px;
    opacity: 0.7;
}

.rstm-heading {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(28px, 4vw, 42px) !important;
    font-weight: 700 !important;
    color: #0B1F3A !important;
    line-height: 1.2 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
}

.rstm-subheading {
    font-size: 16px;
    color: #64748B;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Carousel outer ──────────────────────────────────────────────── */
.rstm-carousel-outer {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.rstm-track-wrap {
    overflow: hidden;
    border-radius: 4px;
}

.rstm-track {
    display: flex;
    gap: 24px;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.rstm-track.is-dragging {
    cursor: grabbing;
    transition: none;
}

/* ── Card ────────────────────────────────────────────────────────── */
.rstm-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: calc((100% - 48px) / 3);
    box-shadow: 0 4px 20px rgba(11, 31, 58, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.rstm-card:hover {
    box-shadow: 0 12px 40px rgba(11, 31, 58, 0.16);
    transform: translateY(-4px);
}

/* Gold corner ribbon */
.rstm-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, transparent 50%, #C8922A 50%);
    border-top-right-radius: 16px;
    z-index: 2;
    pointer-events: none;
}

/* ── Card image ──────────────────────────────────────────────────── */
.rstm-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3.4;
    overflow: hidden;
    background: #0B1F3A;
}

.rstm-card-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.rstm-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.rstm-card:hover .rstm-card-img img {
    transform: scale(1.05);
}

.rstm-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,31,58,0.55) 0%, transparent 55%);
    pointer-events: none;
}

.rstm-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 60px;
    background: #1e3a5f;
    text-decoration: none;
}

/* ── Card body ───────────────────────────────────────────────────── */
.rstm-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rstm-name {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: #0B1F3A !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    line-height: 1.25 !important;
}

.rstm-name a {
    color: inherit;
    text-decoration: none;
}

.rstm-name a:hover {
    color: #C8922A;
}

.rstm-designation {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #C8922A;
    margin-bottom: 12px;
}

.rstm-bio {
    font-size: 13.5px;
    line-height: 1.7;
    color: #64748B;
    flex: 1;
    margin: 0 0 14px;
}

/* ── Social icons (carousel card) ───────────────────────────────── */
.rstm-socials {
    display: flex;
    gap: 7px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rstm-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #F0F4F8;
    color: #0B1F3A;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.rstm-social-icon:hover {
    background: #0B1F3A;
    color: #ffffff;
    transform: translateY(-2px);
}

.rstm-social-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── Profile button ──────────────────────────────────────────────── */
.rstm-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #0B1F3A;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.22s ease, transform 0.22s ease;
    align-self: flex-start;
    margin-top: auto;
}

.rstm-profile-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.rstm-profile-btn:hover {
    background: #C8922A;
    transform: translateY(-1px);
}

.rstm-profile-btn:hover svg {
    transform: translateX(3px);
}

/* ── Arrows ──────────────────────────────────────────────────────── */
.rstm-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #0B1F3A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(11,31,58,0.12);
    transition: background 0.22s, border-color 0.22s, color 0.22s;
    z-index: 10;
    padding: 0;
}

.rstm-arrow:hover {
    background: #C8922A;
    border-color: #C8922A;
    color: #ffffff;
}

.rstm-arrow svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.rstm-arrow-prev { left: -23px; }
.rstm-arrow-next { right: -23px; }

.rstm-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* ── Dots ────────────────────────────────────────────────────────── */
.rstm-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.rstm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, width 0.25s, border-radius 0.25s;
}

.rstm-dot.active {
    background: #C8922A;
    width: 24px;
    border-radius: 4px;
}

/* ── Progress bar ────────────────────────────────────────────────── */
.rstm-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #C8922A;
    border-radius: 0 2px 2px 0;
    width: 0%;
    z-index: 5;
    opacity: 0.85;
}

/* ── Auto notice ─────────────────────────────────────────────────── */
.rstm-auto-notice {
    text-align: center;
    margin-top: 14px;
    font-size: 11.5px;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

/* ── No trainers message ─────────────────────────────────────────── */
.rstm-no-trainers {
    max-width: 600px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    border: 2px dashed #e2e8f0;
    color: #64748B;
    font-family: 'Inter', sans-serif;
}

/* ================================================================
   SINGLE TRAINER PROFILE PAGE
   ================================================================ */

.rstm-profile-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Back link ───────────────────────────────────────────────────── */
.rstm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 36px;
    transition: color 0.2s;
}

.rstm-back-link:hover { color: #ffffff; }

.rstm-back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Hero banner ─────────────────────────────────────────────────── */
.rstm-profile-hero {
    background: linear-gradient(135deg, #0B1F3A 0%, #1a3a6b 60%, #0e2d59 100%);
    padding: 60px 20px 80px;
    position: relative;
    overflow: hidden;
}

.rstm-profile-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200,146,42,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.rstm-profile-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.rstm-profile-hero-content {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

/* ── Profile photo ───────────────────────────────────────────────── */
.rstm-profile-photo-wrap {
    flex-shrink: 0;
    width: 220px;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    border: 4px solid rgba(200,146,42,0.6);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

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

.rstm-profile-photo-placeholder {
    width: 100%;
    height: 100%;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

/* ── Profile intro ───────────────────────────────────────────────── */
.rstm-profile-intro {
    flex: 1;
    padding-top: 10px;
}

.rstm-profile-dept {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rstm-profile-dept span {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(200,146,42,0.25);
    color: #f0c060;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rstm-profile-name {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(30px, 4vw, 48px) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    line-height: 1.15 !important;
}

.rstm-profile-designation {
    font-size: 16px;
    color: #C8922A;
    font-weight: 600;
    margin: 0 0 6px;
}

.rstm-profile-qualification {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    margin: 0 0 24px;
}

/* ── Stats row ───────────────────────────────────────────────────── */
.rstm-profile-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.rstm-stat {
    display: flex;
    flex-direction: column;
}

.rstm-stat-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #C8922A;
    line-height: 1;
}

.rstm-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* ── Profile social icons ────────────────────────────────────────── */
.rstm-profile-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rstm-profile-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rstm-profile-social-icon:hover {
    background: #C8922A;
    color: #ffffff;
    transform: translateY(-2px);
}

.rstm-profile-social-icon svg {
    width: 18px;
    height: 18px;
}

/* ── Profile body ────────────────────────────────────────────────── */
.rstm-profile-body {
    background: #F0F4F8;
    padding: 60px 20px;
}

.rstm-profile-body-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* ── Section blocks ──────────────────────────────────────────────── */
.rstm-profile-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(11,31,58,0.06);
}

.rstm-profile-section:last-child {
    margin-bottom: 0;
}

.rstm-profile-section-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0B1F3A !important;
    margin: 0 0 20px !important;
    padding-bottom: 14px !important;
    border-bottom: 2px solid #F0F4F8 !important;
}

.rstm-profile-bio p,
.rstm-profile-achievements p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 15px;
}

.rstm-profile-bio p:last-child,
.rstm-profile-achievements p:last-child {
    margin-bottom: 0;
}

/* ── Skill tags ──────────────────────────────────────────────────── */
.rstm-skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rstm-skill-tag {
    display: inline-block;
    padding: 7px 16px;
    background: #EEF2FF;
    color: #3730a3;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.rstm-skill-tag:hover {
    background: #0B1F3A;
    color: #ffffff;
}

/* ── Contact card (sidebar) ──────────────────────────────────────── */
.rstm-contact-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(11,31,58,0.06);
    position: sticky;
    top: 100px;
}

.rstm-contact-card-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0B1F3A !important;
    margin: 0 0 24px !important;
    padding-bottom: 14px !important;
    border-bottom: 2px solid #F0F4F8 !important;
}

.rstm-contact-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.rstm-contact-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.rstm-contact-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 3px;
}

.rstm-contact-value {
    display: block;
    font-size: 14px;
    color: #0B1F3A;
    font-weight: 500;
    text-decoration: none;
    word-break: break-word;
}

a.rstm-contact-value:hover {
    color: #C8922A;
}

.rstm-contact-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 24px;
    background: #C8922A;
    color: #ffffff !important;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rstm-contact-btn:hover {
    background: #0B1F3A;
    transform: translateY(-1px);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Carousel cards at 2 visible on tablet */
@media (max-width: 960px) {
    .rstm-card {
        flex: 0 0 calc((100% - 24px) / 2);
        min-width: calc((100% - 24px) / 2);
    }
    .rstm-arrow-prev { left: 0; }
    .rstm-arrow-next { right: 0; }
}

/* Carousel 1 card on mobile */
@media (max-width: 600px) {
    .rstm-section { padding: 56px 16px 70px; }
    .rstm-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
    .rstm-arrow { width: 38px; height: 38px; }
    .rstm-arrow-prev { left: 0; }
    .rstm-arrow-next { right: 0; }
}

/* Single page responsive */
@media (max-width: 960px) {
    .rstm-profile-body-inner {
        grid-template-columns: 1fr;
    }
    .rstm-contact-card {
        position: static;
    }
    .rstm-profile-sidebar {
        order: -1;
    }
}

@media (max-width: 700px) {
    .rstm-profile-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 28px;
    }
    .rstm-profile-photo-wrap {
        width: 160px;
        height: 190px;
    }
    .rstm-profile-stats {
        justify-content: center;
    }
    .rstm-profile-socials {
        justify-content: center;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rstm-track { transition: none; }
    .rstm-card  { transition: none; }
    .rstm-card:hover { transform: none; }
}
