/**
 * Tutor profile pages — legacy (tutor-profile) & listing (tutor-listing-profile)
 */

body.gg-site .gg-profile-page {
    background: var(--gg-bg);
    padding: clamp(20px, 3vw, 36px) 0 clamp(80px, 12vw, 100px);
}

body.gg-site .gg-profile-layout {
    row-gap: 24px;
    align-items: flex-start;
}

/* —— Hero —— */
body.gg-site .gg-profile-hero.listing-profile-hero {
    padding: clamp(24px, 4vw, 40px) 0 clamp(28px, 5vw, 44px);
    margin-bottom: 0;
}

body.gg-site .gg-profile-hero .hero-inner {
    max-width: 920px;
}

body.gg-site .gg-profile-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
}

body.gg-site .gg-profile-breadcrumb a {
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
}

body.gg-site .gg-profile-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

body.gg-site .gg-profile-breadcrumb li + li::before {
    content: '/';
    margin-right: 6px;
    opacity: .65;
}

body.gg-site .gg-profile-hero__body h1 {
    margin: 0 0 8px;
    font-family: var(--gg-display);
    font-size: clamp(1.6rem, 4.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

body.gg-site .gg-profile-hero__subtitle {
    margin: 0 0 14px;
    font-size: clamp(14px, 2.2vw, 17px);
    font-weight: 500;
    color: rgba(255, 255, 255, .9);
    line-height: 1.5;
    max-width: 62ch;
}

body.gg-site .gg-profile-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.gg-site .gg-profile-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--gg-radius-pill);
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

body.gg-site .gg-profile-hero__badge i {
    opacity: .9;
    font-size: 13px;
}

/* —— Main content cards —— */
body.gg-site .gg-profile-section {
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow);
    overflow: hidden;
    margin-bottom: 18px;
    animation: ggProfileFadeUp .45s var(--gg-ease) both;
}

body.gg-site .gg-profile-section:nth-child(2) { animation-delay: .06s; }
body.gg-site .gg-profile-section:nth-child(3) { animation-delay: .12s; }
body.gg-site .gg-profile-section:nth-child(4) { animation-delay: .18s; }

@keyframes ggProfileFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.gg-site .gg-profile-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
    border-bottom: 1px solid var(--gg-border);
    font-size: clamp(15px, 2vw, 17px);
    font-weight: 800;
    color: var(--gg-text);
}

body.gg-site .gg-profile-section__head i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--gg-secondary-soft);
    color: var(--gg-primary);
    font-size: 14px;
    flex-shrink: 0;
}

body.gg-site .gg-profile-section__body {
    padding: 16px 18px 18px;
    color: #2a4058;
    line-height: 1.75;
    font-size: 15px;
}

body.gg-site .gg-profile-section__body p:last-child {
    margin-bottom: 0;
}

body.gg-site .gg-profile-section__body ul {
    margin: 0;
    padding-left: 1.2rem;
}

/* —— Rich text / CKEditor content —— */
body.gg-site .gg-profile-rich-text {
    color: #2a4058;
    line-height: 1.75;
    font-size: 15px;
}

body.gg-site .gg-profile-rich-text > :first-child {
    margin-top: 0;
}

body.gg-site .gg-profile-rich-text > :last-child {
    margin-bottom: 0;
}

body.gg-site .gg-profile-rich-text p {
    margin: 0 0 10px;
}

body.gg-site .gg-profile-rich-text p:last-child {
    margin-bottom: 0;
}

body.gg-site .gg-profile-rich-text h2,
body.gg-site .gg-profile-rich-text h3,
body.gg-site .gg-profile-rich-text h4,
body.gg-site .gg-profile-rich-text h5 {
    margin: 18px 0 10px;
    color: var(--gg-text);
    font-weight: 800;
    line-height: 1.35;
}

body.gg-site .gg-profile-rich-text h2:first-child,
body.gg-site .gg-profile-rich-text h3:first-child,
body.gg-site .gg-profile-rich-text h4:first-child,
body.gg-site .gg-profile-rich-text .gg-topic-heading:first-child {
    margin-top: 0;
}

body.gg-site .gg-profile-rich-text .gg-topic-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eef5fc 0%, #f8fbff 100%);
    border-left: 4px solid var(--gg-primary);
    font-size: 15px;
    font-weight: 800;
    color: var(--gg-primary-dark);
}

body.gg-site .gg-profile-rich-text .gg-topic-heading::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gg-primary);
    flex-shrink: 0;
}

body.gg-site .gg-profile-rich-text .gg-topic-list {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

body.gg-site .gg-profile-rich-text .gg-topic-list li {
    position: relative;
    margin: 0;
    padding: 10px 12px 10px 30px;
    border: 1px solid var(--gg-border);
    border-radius: 10px;
    background: #fbfdff;
    color: #2a4058;
    line-height: 1.5;
}

body.gg-site .gg-profile-rich-text .gg-topic-list li::before {
    content: '\f00c';
    font-family: FontAwesome;
    position: absolute;
    left: 11px;
    top: 11px;
    font-size: 11px;
    color: var(--gg-primary);
}

body.gg-site .gg-profile-rich-text ul:not(.gg-topic-list),
body.gg-site .gg-profile-rich-text ol {
    margin: 0 0 12px;
    padding-left: 1.25rem;
}

body.gg-site .gg-profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.gg-site .gg-profile-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: var(--gg-radius-pill);
    background: var(--gg-chip);
    border: 1px solid var(--gg-border);
    color: var(--gg-primary-dark);
    font-size: 13px;
    font-weight: 700;
}

/* —— Sidebar card —— */
body.gg-site .gg-profile-aside {
    position: relative;
}

body.gg-site .gg-profile-card {
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow-md);
    padding: 20px 18px 18px;
    text-align: center;
    position: sticky;
    top: 88px;
    animation: ggProfileFadeUp .5s var(--gg-ease) both;
}

body.gg-site .gg-profile-card__photo-wrap {
    position: relative;
    width: min(220px, 72vw);
    margin: 0 auto 14px;
}

body.gg-site .gg-profile-card__photo {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--gg-radius-md);
    border: 3px solid #fff;
    box-shadow: var(--gg-shadow-sm);
    background: var(--gg-chip);
}

body.gg-site .gg-profile-card__verified {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gg-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    font-size: 14px;
    box-shadow: var(--gg-shadow-sm);
}

body.gg-site .gg-profile-card h2 {
    margin: 0 0 4px;
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    font-weight: 800;
    color: var(--gg-text);
    line-height: 1.25;
}

body.gg-site .gg-profile-card__role {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gg-muted);
}

body.gg-site .gg-profile-stats {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    text-align: left;
}

body.gg-site .gg-profile-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7fafc;
    border: 1px solid var(--gg-border);
}

body.gg-site .gg-profile-stat__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gg-secondary-soft);
    color: var(--gg-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

body.gg-site .gg-profile-stat__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gg-muted);
    line-height: 1.2;
}

body.gg-site .gg-profile-stat__value {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--gg-text);
    line-height: 1.3;
}

body.gg-site .gg-profile-card .chat-nw-btn {
    width: 100%;
    min-height: 46px;
    border-radius: var(--gg-radius-pill);
    font-weight: 800;
    font-size: 15px;
    border: none;
    box-shadow: var(--gg-shadow-glow);
    transition: transform .2s var(--gg-ease), box-shadow .2s var(--gg-ease);
}

body.gg-site .gg-profile-card .chat-nw-btn:hover {
    transform: translateY(-1px);
}

body.gg-site .gg-profile-card__note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--gg-muted);
    line-height: 1.45;
}

/* —— Mobile sticky CTA —— */
body.gg-site .gg-profile-mobile-cta {
    display: none;
}

/* —— Responsive —— */
@media (max-width: 991px) {
    body.gg-site .gg-profile-aside {
        order: -1;
    }

    body.gg-site .gg-profile-card {
        position: static;
        top: auto;
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 14px 16px;
        text-align: left;
        align-items: center;
        padding: 16px;
    }

    body.gg-site .gg-profile-card__photo-wrap {
        width: 120px;
        margin: 0;
        grid-row: 1 / span 3;
    }

    body.gg-site .gg-profile-card h2,
    body.gg-site .gg-profile-card__role {
        grid-column: 2;
        margin: 0;
    }

    body.gg-site .gg-profile-stats {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
    }

    body.gg-site .gg-profile-card .chat-nw-btn,
    body.gg-site .gg-profile-card__note {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    body.gg-site .gg-profile-page {
        padding-bottom: 88px;
    }

    body.gg-site .gg-profile-card {
        grid-template-columns: 96px 1fr;
        gap: 10px 12px;
        padding: 14px;
    }

    body.gg-site .gg-profile-card__photo-wrap {
        width: 96px;
    }

    body.gg-site .gg-profile-stats {
        grid-template-columns: 1fr;
    }

    body.gg-site .gg-profile-section__head {
        padding: 12px 14px;
    }

    body.gg-site .gg-profile-section__body {
        padding: 14px;
        font-size: 14px;
    }

    body.gg-site .gg-profile-mobile-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--gg-border);
        box-shadow: 0 -8px 24px rgba(15, 36, 56, .1);
        backdrop-filter: blur(10px);
    }

    body.gg-site .gg-profile-mobile-cta__info {
        min-width: 0;
        flex: 1;
    }

    body.gg-site .gg-profile-mobile-cta__name {
        display: block;
        font-size: 14px;
        font-weight: 800;
        color: var(--gg-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.gg-site .gg-profile-mobile-cta__meta {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--gg-muted);
    }

    body.gg-site .gg-profile-mobile-cta .chat-nw-btn {
        flex-shrink: 0;
        min-height: 44px;
        padding: 0 18px;
        border-radius: var(--gg-radius-pill);
        font-weight: 800;
        white-space: nowrap;
        border: none;
    }

    body.gg-site .gg-profile-card .chat-nw-btn {
        display: none;
    }
}

@media (max-width: 420px) {
    body.gg-site .gg-profile-hero__badge {
        font-size: 11px;
        padding: 6px 10px;
    }
}
