/**
 * Profile Template Custom Styles (v2)
 * 
 * This file contains all custom styling for the profile template with high specificity
 * (#profile-template-wrapper prefix) to effectively override Elementor styles.
 * 
 * Key Features:
 * - Uses #profile-template-wrapper ID prefix for maximum specificity
 * - Eliminates !important dependency through selector specificity
 * - Maintains brand colors: steelblue, #e8f4f8, goldenrod, and neutral tones
 * - Responsive design with mobile-first approach
 * - Modular, maintainable CSS structure
 */

/* ========================================
   COLOR SYSTEM & CSS VARIABLES
   ======================================== */

#profile-template-wrapper {
    --color-primary: steelblue;
    --color-primary-light: #e8f4f8;
    --color-primary-light-border: #bce0fd;
    --color-accent: goldenrod;
    
    --color-text-dark: #111;
    --color-text-main: #333;
    --color-text-secondary: #555;
    --color-text-muted: #666;
    --color-text-light: #888;
    --color-text-lighter: #999;
    
    --color-bg-white: #fff;
    --color-bg-light: #f8f9fa;
    --color-bg-lighter: #fafafa;
    --color-bg-secondary: #eef6ff;
    
    --color-border: #eee;
    --color-border-light: #ddd;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 14px;
    --spacing-xl: 16px;
    --spacing-2xl: 20px;
    --spacing-3xl: 22px;
    --spacing-4xl: 24px;
    
    --border-radius-sm: 8px;
    --border-radius-md: 10px;
    --border-radius-lg: 12px;
    --border-radius-full: 999px;
    
    --font-weight-normal: 400;
    --font-weight-semi: 600;
    --font-weight-bold: 700;
    
    --transition-base: 450ms ease;
}

/* ========================================
   CONTAINER & WRAPPER
   ======================================== */

#profile-template-wrapper {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-4xl);
}

/* ========================================
   HEADER SECTION
   ======================================== */

#profile-template-wrapper .hk-sp-header {
    padding: var(--spacing-2xl);
    background: var(--color-bg-white);
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
    margin: 0 0 var(--spacing-2xl) 0;
    position: relative;
}

/* Header Export Button */
#profile-template-wrapper .hk-sp-header .hk-sp-pdf-export-btn {
    margin-left: auto;
    margin-top: var(--spacing-lg);
    width: auto;
}

/* Ensure export button is not hidden by theme/global rules */
#profile-template-wrapper .hk-sp-pdf-export-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Photo/Image Areas */
#profile-template-wrapper .hk-sp-photo {
    width: 100%;
    aspect-ratio: 4/3;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

#profile-template-wrapper .hk-sp-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#profile-template-wrapper .hk-sp-photo.hk-sp-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-lighter);
    font-size: 0.9rem;
}

/* Photo Carousel */
#profile-template-wrapper .hk-sp-photo.hk-sp-photo--carousel {
    position: relative;
}

#profile-template-wrapper .hk-sp-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transform: translateX(0);
    transition: transform var(--transition-base);
}

#profile-template-wrapper .hk-sp-carousel-slide {
    flex: 0 0 100%;
    height: 100%;
}

#profile-template-wrapper .hk-sp-photo.hk-sp-photo--carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Names & Title Area */
#profile-template-wrapper .hk-sp-names {
    display: flex;
    flex-direction: column;
}

#profile-template-wrapper .hk-sp-names h1 {
    margin: 0 0 var(--spacing-lg) 0;
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    line-height: 1.2;
}

#profile-template-wrapper .hk-sp-name-lines {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

#profile-template-wrapper .hk-sp-name-lines li {
    margin: 0;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

#profile-template-wrapper .hk-sp-desc {
    margin-top: var(--spacing-lg);
    color: var(--color-text-main);
    line-height: 1.8;
    font-weight: var(--font-weight-semi);
}

#profile-template-wrapper .hk-sp-desc p {
    margin: 0 0 var(--spacing-lg) 0;
}

/* ========================================
   LAYOUT: MAIN 2-COLUMN LAYOUT
   ======================================== */

#profile-template-wrapper .hk-sp-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: var(--spacing-3xl);
    align-items: start;
}

#profile-template-wrapper .hk-sp-toc-col {
    min-width: 0;
}

#profile-template-wrapper .hk-sp-toc-placeholder {
    display: block;
    height: 0;
}

/* ========================================
   TABLE OF CONTENTS (TOC)
   ======================================== */

#profile-template-wrapper .hk-sp-toc {
    position: relative;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    max-height: calc(100vh - 24px);
    overflow: auto;
}

#profile-template-wrapper .hk-sp-toc.hk-sp-toc--fixed {
    position: fixed;
    top: 25px;
    z-index: 9999;
}

#profile-template-wrapper .hk-sp-toc-school {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    margin: 0 0 var(--spacing-lg) 0;
    padding-bottom: 0;
    border-bottom: 0;
}

#profile-template-wrapper .hk-sp-toc-school--desktop {
    background: var(--color-bg-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
}

#profile-template-wrapper .hk-sp-toc-school img {
    height: 18px;
    width: 18px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    flex: 0 0 auto;
}

#profile-template-wrapper .hk-sp-toc-school-title {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    font-size: 0.95rem;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#profile-template-wrapper .hk-sp-toc-title {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    margin: 0 0 var(--spacing-lg) 0;
    font-size: 0.95rem;
}

#profile-template-wrapper .hk-sp-toc a {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
    text-decoration: none;
    color: var(--color-text-main);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    line-height: 1.2;
}

#profile-template-wrapper .hk-sp-toc a:hover {
    background: var(--color-bg-light);
}

#profile-template-wrapper .hk-sp-toc a.hk-sp-active {
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary-light-border);
    color: #0073aa;
}

#profile-template-wrapper .hk-sp-toc .dashicons {
    font-size: 18px;
    line-height: 18px;
    margin-top: 1px;
    color: var(--color-primary);
}

#profile-template-wrapper .hk-sp-toc-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#profile-template-wrapper .hk-sp-toc-cn {
    font-weight: var(--font-weight-semi);
}

#profile-template-wrapper .hk-sp-toc-en {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

#profile-template-wrapper .hk-sp-content {
    min-width: 0;
}

#profile-template-wrapper .hk-sp-section {
    scroll-margin-top: 16px;
    margin: 0 0 var(--spacing-3xl) 0;
}

#profile-template-wrapper .hk-sp-section-box {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    background: var(--color-bg-white);
    padding: 0;
    overflow: hidden;
}

#profile-template-wrapper .hk-sp-section-title {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-2xl);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-white);
}

#profile-template-wrapper .hk-sp-section-title .dashicons {
    font-size: 22px;
    line-height: 22px;
    color: var(--color-primary);
    margin: 0;
}

#profile-template-wrapper .hk-sp-section-title h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

#profile-template-wrapper .hk-sp-section-title .hk-sp-sub {
    margin-left: 0;
    color: var(--color-accent);
    font-weight: var(--font-weight-semi);
    font-size: 1rem;
}

#profile-template-wrapper .hk-sp-section-body {
    padding: var(--spacing-xl);
}

#profile-template-wrapper .hk-sp-section h4 {
    margin: var(--spacing-2xl) 0 var(--spacing-lg) 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    position: relative;
    padding-left: 32px;
    letter-spacing: -0.5px;
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: var(--spacing-sm);
}

#profile-template-wrapper .hk-sp-section h5 {
    margin: 15px 0 var(--spacing-sm) 0;
    font-size: 1.05rem;
    font-weight: var(--font-weight-semi);
    color: var(--color-text-secondary);
    position: relative;
    padding-left: 24px;
}

#profile-template-wrapper .hk-sp-section h4::before {
    content: "\f175";
    font-family: dashicons;
    position: absolute;
    left: 0;
    top: 35%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 20px;
}

#profile-template-wrapper .hk-sp-section h5::before {
    content: "\f139";
    font-family: dashicons;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-primary);
    opacity: 0.9;
}

#profile-template-wrapper .hk-sp-section-body * + h4 {
    margin-top: 28px;
}

#profile-template-wrapper .hk-sp-section-body * + h5 {
    margin-top: 22px;
}

/* Specific sections with looser text */
#profile-template-wrapper #scholarship .hk-sp-section-body,
#profile-template-wrapper #mbu .hk-sp-section-body,
#profile-template-wrapper #living .hk-sp-section-body {
    line-height: 1.8rem;
}

/* ========================================
   FEES SECTIONS LAYOUT (分组学费 & 其他费用)
   ======================================== */

#profile-template-wrapper #fees .hk-sp-fees-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 28px;
}

#profile-template-wrapper #fees .hk-sp-fees-section {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background: var(--color-bg-light);
}

#profile-template-wrapper #fees .hk-sp-fees-section h4 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--color-primary);
    font-weight: var(--font-weight-semi);
}

/* ========================================
   SCHOLARSHIP BOXES LAYOUT
   ======================================== */

#profile-template-wrapper #scholarship .hk-sp-scholarship-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

#profile-template-wrapper #scholarship .hk-sp-scholarship-box {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background: var(--color-bg-light);
}

#profile-template-wrapper #scholarship .hk-sp-scholarship-box h4 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--color-primary);
    font-weight: var(--font-weight-semi);
}

/* ========================================
   LISTS
   ======================================== */

#profile-template-wrapper .hk-sp-section-body ul:not(.hk-sp-name-lines),
#profile-template-wrapper .hk-sp-section-body ol {
    padding-left: 0;
    margin-left: 0;
    list-style-position: inside;
}

#profile-template-wrapper .hk-sp-section-body ul:not(.hk-sp-name-lines) li,
#profile-template-wrapper .hk-sp-section-body ol li {
    padding: var(--spacing-sm) 0;
    margin: 0;
}

#profile-template-wrapper .hk-sp-section-body ul:not(.hk-sp-name-lines) li + li,
#profile-template-wrapper .hk-sp-section-body ol li + li {
    border-top: 1px dotted var(--color-border-light);
    position: relative;
}

/* Card list items: use solid divider with fixed/consistent length */
#profile-template-wrapper .hk-sp-card ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

#profile-template-wrapper .hk-sp-card ul li {
    padding: var(--spacing-sm) 0;
    margin: 0;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
}

#profile-template-wrapper .hk-sp-card ul li + li {
    border-top: 1px solid var(--color-border);
    position: relative;
    margin-top: 0;
}

/* ========================================
   CARD COMPONENT
   ======================================== */

#profile-template-wrapper .hk-sp-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    background: var(--color-bg-white);
}

#profile-template-wrapper .hk-sp-card h3 {
    margin: 0 0 var(--spacing-lg) 0;
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
}

#profile-template-wrapper .hk-sp-card h3.hk-sp-card-title {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

#profile-template-wrapper .hk-sp-card h3.hk-sp-card-title .dashicons {
    font-size: 18px;
    line-height: 18px;
    color: var(--color-primary);
}

/* ========================================
   KEY-VALUE DISPLAY
   ======================================== */

#profile-template-wrapper .hk-sp-kv {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--spacing-sm) var(--spacing-lg);
    align-items: start;
}

#profile-template-wrapper .hk-sp-kv.hk-sp-kv--compact {
    grid-template-columns: 84px 1fr;
}

#profile-template-wrapper .hk-sp-kv.hk-sp-kv--contact {
    grid-template-columns: 50px 1fr;
}

#profile-template-wrapper .hk-sp-kv .k {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    width:120px;
}

#profile-template-wrapper .hk-sp-kv .v {
    color: var(--color-text-dark);
    font-size: 0.9rem;
    word-break: break-word;
}

/* Curriculum cards: stack label/value */
#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) 0;
}

/* Curriculum cards: keep specific rows on one line */
#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row.hk-sp-kv-row--inline {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: var(--spacing-sm);
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row.hk-sp-kv-row--inline .k {
    flex: 0 0 auto;
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row.hk-sp-kv-row--inline .v {
    flex: 0 1 auto;
    text-align: left;
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row + .hk-sp-kv-row {
    border-top: 1px solid var(--color-border);
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row .k {
    font-weight: var(--font-weight-semi);
    color: var(--color-primary);
}

/* FIX: Curriculum cards divider should span full card width; keep values left-aligned */
#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv {
    align-items: stretch;
}

/* Curriculum cards: do NOT reuse global .hk-sp-kv .k width; use a tighter label width here. */
#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv.hk-sp-kv--curriculum .hk-sp-kv-row.hk-sp-kv-row--inline .k {
    width: 50px !important;
    flex: 0 0 50px;
    white-space: nowrap;
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row {
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row.hk-sp-kv-row--inline {
    justify-content: flex-start;
    gap: var(--spacing-sm);
}

#profile-template-wrapper .hk-sp-curriculum-cards .hk-sp-kv-row.hk-sp-kv-row--inline .v {
    text-align: left;
    min-width: 0;
}

/* ========================================
   LINKS
   ======================================== */

#profile-template-wrapper .hk-sp-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

#profile-template-wrapper .hk-sp-link {
    display: inline-flex;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--color-primary);
    background: var(--color-bg-white);
    font-size: 0.9rem;
}

#profile-template-wrapper .hk-sp-link:hover {
    background: #f0f7fb;
}

/* ========================================
   OVERVIEW LAYOUT
   ======================================== */

#profile-template-wrapper .hk-sp-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

#profile-template-wrapper .hk-sp-overview-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

#profile-template-wrapper .hk-sp-overview-left {
    height: 100%;
}

#profile-template-wrapper .hk-sp-overview-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#profile-template-wrapper .hk-sp-divider {
    height: 1px;
    background: var(--color-border);
    margin: 14px 0;
}

#profile-template-wrapper .hk-sp-overview-group-title {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    margin: 0 0 var(--spacing-lg) 0;
    font-size: 1rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

#profile-template-wrapper .hk-sp-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

#profile-template-wrapper .hk-sp-contact .hk-sp-card {
    padding: var(--spacing-md);
}

/* ========================================
   EMPTY STATE
   ======================================== */

#profile-template-wrapper .hk-sp-empty {
    padding: 14px;
    border: 1px dashed var(--color-border-light);
    border-radius: var(--border-radius-md);
    color: var(--color-text-muted);
    background: var(--color-bg-lighter);
}

/* ========================================
   RELATIONS
   ======================================== */

#profile-template-wrapper .hk-sp-relations {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

#profile-template-wrapper .hk-sp-rel {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    text-decoration: none;
    color: inherit;
    background: var(--color-bg-white);
}

#profile-template-wrapper .hk-sp-rel:hover {
    background: var(--color-bg-light);
}

#profile-template-wrapper .hk-sp-rel-img {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid var(--color-border);
    flex: 0 0 auto;
}

#profile-template-wrapper .hk-sp-rel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#profile-template-wrapper .hk-sp-rel-txt {
    min-width: 0;
}

#profile-template-wrapper .hk-sp-rel-title {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#profile-template-wrapper .hk-sp-rel-sub {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

#profile-template-wrapper .hk-sp-three-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-xl);
}

#profile-template-wrapper .hk-sp-four-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--spacing-xl);
}

#profile-template-wrapper .hk-sp-four-grid.hk-sp-curriculum-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#profile-template-wrapper .hk-sp-curriculum-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#profile-template-wrapper .hk-sp-acc-stack {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

#profile-template-wrapper .hk-sp-two-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

/* ========================================
   PRICE LIST
   ======================================== */

#profile-template-wrapper .hk-sp-price-list {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: var(--color-bg-white);
}

#profile-template-wrapper .hk-sp-price-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
}

#profile-template-wrapper .hk-sp-price-row:last-child {
    border-bottom: 0;
}

#profile-template-wrapper .hk-sp-price-label {
    font-weight: var(--font-weight-semi);
    color: var(--color-text-main);
}

#profile-template-wrapper .hk-sp-price-value {
    color: var(--color-text-dark);
}

#profile-template-wrapper .hk-sp-price-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
}

/* ========================================
   FEES LIST (match Fees-by-Group-Repeater.php)
   ======================================== */

#profile-template-wrapper .fees-list-container {
    line-height: 1.8;
}

#profile-template-wrapper .fees-list-item {
    margin-bottom: var(--spacing-2xl);
}

#profile-template-wrapper .fees-list-main {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}

#profile-template-wrapper .fees-list-main .grade-text {
    font-size: 0.9rem;
    font-weight: var(--font-weight-semi);
    color: var(--color-text-dark);
    margin-right: 5px;
    flex-shrink: 0;
}

#profile-template-wrapper .fees-list-main .dotted-line {
    flex: 1;
    margin: 0 5px;
    height: 1px;
    min-width: 20px;
    border-bottom: 1px dotted var(--color-text-muted);
}

#profile-template-wrapper .fees-list-main .fees-text {
    font-size: 0.9rem;
    font-weight: var(--font-weight-semi);
    color: var(--color-primary);
    flex-shrink: 0;
}

#profile-template-wrapper .fees-list-description {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: var(--spacing-lg);
    margin-left: 0;
    margin-bottom: 15px;
}

/* ========================================
   EXAM RESULTS TABLE
   ======================================== */

/* Vertically center text inside exam results table cells */
#profile-template-wrapper .exam-results-table th,
#profile-template-wrapper .exam-results-table td {
    vertical-align: middle;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */

#profile-template-wrapper .hk-sp-bottom-nav {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 0 0;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background: var(--color-bg-white);
}

#profile-template-wrapper .hk-sp-bottom-nav a {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--color-primary);
    background: var(--color-bg-white);
    font-size: 0.9rem;
}

#profile-template-wrapper .hk-sp-bottom-nav a:hover {
    background: #f0f7fb;
}

#profile-template-wrapper .hk-sp-bottom-nav .hk-sp-bottom-nav--disabled {
    opacity: 0.45;
    border-style: dashed;
    pointer-events: none;
}

/* ========================================
   ACCORDION (DETAILS ELEMENT)
   ======================================== */

#profile-template-wrapper .hk-sp-acc {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background: var(--color-bg-white);
    overflow: hidden;
}

#profile-template-wrapper .hk-sp-acc summary {
    list-style: none;
    cursor: pointer;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-bg-light);
    font-weight: var(--font-weight-semi);
}

#profile-template-wrapper .hk-sp-acc summary::-webkit-details-marker {
    display: none;
}

#profile-template-wrapper .hk-sp-acc[open] summary {
    background: var(--color-bg-secondary);
}

#profile-template-wrapper .hk-sp-acc-body {
    padding: var(--spacing-md) var(--spacing-lg);
}

/* ========================================
   RESPONSIVE: TABLET & MOBILE (max-width: 960px)
   ======================================== */

@media (max-width: 960px), (max-device-width: 960px) {
    #profile-template-wrapper .hk-sp-layout {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-toc-col {
        position: relative;
        overflow: visible;
    }

    #profile-template-wrapper .hk-sp-toc {
        position: sticky;
        top: 0;
        z-index: 50;
        overflow: visible;
        white-space: normal;
        max-height: none;
        background: var(--color-bg-white);
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        padding: var(--spacing-md);
    }

    #profile-template-wrapper .hk-sp-toc-desktop {
        display: none;
    }

    #profile-template-wrapper .hk-sp-toc-mobile.hk-sp-acc {
        border: none;
        background: transparent;
        border-radius: 0;
        margin: 0;
        padding: 0;
    }

    #profile-template-wrapper .hk-sp-toc-mobile .hk-sp-acc-body {
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    #profile-template-wrapper .hk-sp-toc-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #profile-template-wrapper .hk-sp-toc a {
        display: flex;
        margin: 0;
    }

    #profile-template-wrapper .hk-sp-toc-school--desktop {
        display: none;
    }

    #profile-template-wrapper .hk-sp-toc-school--mobile {
        display: flex;
    }

    #profile-template-wrapper .hk-sp-toc-mobile summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--spacing-lg);
        background: transparent;
        padding: var(--spacing-lg);
        border-bottom: 1px solid var(--color-border-light);
        margin: 0;
    }

    #profile-template-wrapper .hk-sp-toc-mobile[open] summary {
        background: transparent;
        border-bottom: 1px solid var(--color-border-light);
    }

    #profile-template-wrapper .hk-sp-toc-mobile .hk-sp-acc-body {
        padding: var(--spacing-sm) var(--spacing-lg);
        max-height: calc(100vh - 64px);
        overflow: auto;
    }

    #profile-template-wrapper .hk-sp-toc-school--mobile {
        margin: 0;
        padding: 0;
        border: 0;
    }

    /* Increase specificity to beat Elementor button styles */
    #profile-template-wrapper .hk-sp-toc details.hk-sp-toc-mobile summary button.hk-sp-toc-toggle {
        appearance: none !important;
        -webkit-appearance: none !important;
        border: 1px solid var(--color-border) !important;
        background: var(--color-bg-white) !important;
        border-radius: var(--border-radius-full) !important;
        padding: 6px var(--spacing-lg) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--spacing-sm) !important;
        cursor: pointer !important;
        color: var(--color-text-dark) !important;
        font: inherit !important;
        line-height: 1 !important;
        margin: 0 !important;
        text-transform: none !important;
        box-shadow: none !important;
    }

    #profile-template-wrapper .hk-sp-toc details.hk-sp-toc-mobile summary button.hk-sp-toc-toggle:hover {
        background: var(--color-bg-light) !important;
    }

    #profile-template-wrapper .hk-sp-toc details.hk-sp-toc-mobile summary button.hk-sp-toc-toggle .dashicons {
        margin: 0;
        color: var(--color-primary);
    }

    #profile-template-wrapper .hk-sp-toc-mobile[open] .hk-sp-toc-toggle-icon {
        transform: rotate(180deg);
    }

    #profile-template-wrapper .hk-sp-four-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========================================
   RESPONSIVE: MOBILE (max-width: 820px)
   ======================================== */

@media (max-width: 820px) {
    #profile-template-wrapper {
        padding: 0 var(--spacing-xl);
    }

    #profile-template-wrapper .hk-sp-header {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-photo.hk-sp-photo--empty {
        display: none;
    }

    #profile-template-wrapper .hk-sp-overview-grid {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-overview-layout {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-contact {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-three-grid {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-two-grid {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-four-grid {
        grid-template-columns: 1fr;
    }

    #profile-template-wrapper .hk-sp-price-row {
        grid-template-columns: 1fr;
    }

    /* Mobile typography */
    #profile-template-wrapper h1 {
        font-size: 1.5rem !important;
    }

    #profile-template-wrapper h2 {
        font-size: 1.1rem !important;
    }

    #profile-template-wrapper h3 {
        font-size: 1rem !important;
    }

    #profile-template-wrapper h4 {
        font-size: 1rem !important;
    }

    #profile-template-wrapper h5 {
        font-size: 0.9rem !important;
    }

    #profile-template-wrapper .hk-sp-name-lines li {
        font-size: 0.75rem !important;
    }

    #profile-template-wrapper .hk-sp-desc p {
        font-size: 0.9rem !important;
    }

    #profile-template-wrapper .hk-sp-toc-school-title {
        font-size: 1.1rem !important;
    }

    #profile-template-wrapper .hk-sp-kv .k {
        font-size: 0.9rem !important;
        width: 100px !important;
    }

    /* Mobile: remove TOC outer padding */
    #profile-template-wrapper .hk-sp-toc {
        padding: 0 !important;
    }

    /* Mobile: remove accordion summary background */
    #profile-template-wrapper .hk-sp-acc summary {
        background: transparent !important;
    }

    /* Keep icons legible */
    #profile-template-wrapper .dashicons {
        font-size: 18px !important;
        line-height: 18px !important;
    }

    #profile-template-wrapper .hk-sp-toc .dashicons {
        font-size: 18px !important;
        line-height: 18px !important;
    }

    #profile-template-wrapper .hk-sp-section-body {
        line-height: 1.6;
    }

    #profile-template-wrapper .hk-sp-section-title {
        padding: 20px;
    }

    #profile-template-wrapper .hk-sp-section h4 {
        padding-left: 28px;
        font-size: 1rem;
    }

    #profile-template-wrapper .hk-sp-section h5 {
        padding-left: 20px;
    }

    /* Make kv content wider on mobile */
    #profile-template-wrapper .hk-sp-kv {
        grid-template-columns: 80px 1fr;
        gap: var(--spacing-sm) var(--spacing-lg);
    }

    #profile-template-wrapper .hk-sp-kv.hk-sp-kv--compact {
        grid-template-columns: 120px 1fr;
    }

    #profile-template-wrapper .hk-sp-kv.hk-sp-kv--contact {
        grid-template-columns: 50px 1fr;
    }

    /* Fees list mobile tweaks */
    #profile-template-wrapper .fees-list-main .dotted-line {
        margin: 0 3px;
        min-width: 10px;
    }
}

/* ========================================
   DESKTOP: TOC (min-width: 961px)
   ======================================== */

@media (min-width: 961px) {
    #profile-template-wrapper .hk-sp-toc {
        position: sticky;
        top: 25px;
        z-index: 9999;
    }

    #profile-template-wrapper .hk-sp-toc-desktop {
        display: block;
    }

    #profile-template-wrapper .hk-sp-toc-mobile {
        display: none;
    }

    #profile-template-wrapper .hk-sp-toc-school--mobile {
        display: none;
    }

    #profile-template-wrapper .hk-sp-toc-school--desktop {
        display: flex;
    }
}

/* ========================================
   UTILITY & SPECIAL CASES
   ======================================== */

#profile-template-wrapper .hk-sp-wrapper p.hk-sp-curriculum-overview {
    margin: 10px 0 10px 0 !important;
}

/* ========================================
   OPTION 1: 高级动画效果
   ======================================== */

/* 卡片 Hover 阴影和浮起效果 */
#profile-template-wrapper .hk-sp-card {
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#profile-template-wrapper .hk-sp-card:hover {
    box-shadow: 0 8px 16px rgba(70, 130, 180, 0.12);
    transform: translateY(-3px);
}

/* 关联卡片 hover 效果 */
#profile-template-wrapper .hk-sp-rel {
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#profile-template-wrapper .hk-sp-rel:hover {
    background: var(--color-bg-light);
    box-shadow: 0 6px 12px rgba(70, 130, 180, 0.1);
    transform: translateX(4px);
}

/* 按钮和链接按压效果 */
#profile-template-wrapper .hk-sp-link {
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

#profile-template-wrapper .hk-sp-link:hover {
    background: #f0f7fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(70, 130, 180, 0.15);
}

#profile-template-wrapper .hk-sp-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(70, 130, 180, 0.1);
}

/* 底部导航按钮动画 */
#profile-template-wrapper .hk-sp-bottom-nav a {
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#profile-template-wrapper .hk-sp-bottom-nav a:hover {
    background: #f0f7fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(70, 130, 180, 0.15);
}

#profile-template-wrapper .hk-sp-bottom-nav a:active {
    transform: translateY(0);
}

/* TOC 链接 hover 指示器 */
#profile-template-wrapper .hk-sp-toc a {
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-left: var(--spacing-lg);
}

#profile-template-wrapper .hk-sp-toc a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--color-primary);
    transition: height 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

#profile-template-wrapper .hk-sp-toc a:hover:before {
    height: 100%;
}

#profile-template-wrapper .hk-sp-toc a.hk-sp-active:before {
    height: 100%;
}

/* 手风琴展开动画 */
#profile-template-wrapper .hk-sp-acc {
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

#profile-template-wrapper .hk-sp-acc summary {
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

#profile-template-wrapper .hk-sp-acc summary:hover {
    background: var(--color-bg-light);
}

#profile-template-wrapper .hk-sp-acc[open] summary {
    background: var(--color-bg-secondary);
}

#profile-template-wrapper .hk-sp-acc-body {
    animation: slideDown 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 1000px;
        overflow: visible;
    }
}

/* 输入框聚焦动画（用于搜索） */
#profile-template-wrapper input[type="search"],
#profile-template-wrapper input[type="text"] {
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    border-color: var(--color-border);
}

#profile-template-wrapper input[type="search"]:focus,
#profile-template-wrapper input[type="text"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.1);
    outline: none;
}

/* 按钮加载动画容器 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 数据加载时的脉冲效果 */
#profile-template-wrapper .loading {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#profile-template-wrapper .spinner {
    animation: spin 1s linear infinite;
}

/* 页面滚动时淡入效果 */
#profile-template-wrapper .fade-in {
    animation: fadeIn 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 数字计数动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#profile-template-wrapper .counter {
    animation: countUp 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   OPTION 2: 排版增强
   ======================================== */

/* 优化字体系统 */
#profile-template-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 优化标题排版 */
#profile-template-wrapper h1,
#profile-template-wrapper h2,
#profile-template-wrapper h3,
#profile-template-wrapper h4,
#profile-template-wrapper h5,
#profile-template-wrapper h6 {
    letter-spacing: -0.5px;
    line-height: 1.3;
}

#profile-template-wrapper h1 {
    letter-spacing: -1px;
    line-height: 1.2;
}

/* 优化正文排版 */
#profile-template-wrapper p {
    line-height: 1.6;
    letter-spacing: 0.3px;
}

#profile-template-wrapper .hk-sp-section-body {
    line-height: 1.7;
}

/* 优化列表排版 */
#profile-template-wrapper .hk-sp-section-body ul,
#profile-template-wrapper .hk-sp-section-body ol {
    line-height: 1.8;
}

#profile-template-wrapper .hk-sp-section-body li {
    margin-bottom: 8px;
}

/* 优化描述文本 */
#profile-template-wrapper .hk-sp-desc {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* 优化卡片标题排版 */
#profile-template-wrapper .hk-sp-card h3 {
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

/* 优化 TOC 排版 */
#profile-template-wrapper .hk-sp-toc-cn {
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

#profile-template-wrapper .hk-sp-toc-en {
    font-size: 0.8rem;
    letter-spacing: 0.1px;
    opacity: 0.85;
}

/* 优化小副文本 */
#profile-template-wrapper .hk-sp-price-desc,
#profile-template-wrapper .hk-sp-rel-sub {
    line-height: 1.5;
}

/* 优化链接排版 */
#profile-template-wrapper a {
    text-decoration: none;
    transition: color 200ms ease;
}

#profile-template-wrapper a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 优化代码块（如果有的话） */
#profile-template-wrapper code,
#profile-template-wrapper pre {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    background: var(--color-bg-lighter);
    border-radius: var(--border-radius-sm);
    padding: 2px 6px;
}

/* 优化强调文本 */
#profile-template-wrapper strong,
#profile-template-wrapper b {
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* 优化斜体 */
#profile-template-wrapper em,
#profile-template-wrapper i {
    letter-spacing: 0.2px;
}

/* 优化引用块 */
#profile-template-wrapper blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 16px;
    margin-left: 0;
    opacity: 0.85;
    font-style: italic;
}

/* ========================================
   OPTION 5: 微交互
   ======================================== */

/* 复选框和单选框样式 */
#profile-template-wrapper input[type="checkbox"],
#profile-template-wrapper input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 250ms ease;
    background: var(--color-bg-white);
}

#profile-template-wrapper input[type="radio"] {
    border-radius: 50%;
}

#profile-template-wrapper input[type="checkbox"]:hover,
#profile-template-wrapper input[type="radio"]:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.1);
}

#profile-template-wrapper input[type="checkbox"]:checked,
#profile-template-wrapper input[type="radio"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* 标签点击反馈 */
#profile-template-wrapper label {
    transition: color 200ms ease;
    cursor: pointer;
}

#profile-template-wrapper label:hover {
    color: var(--color-primary);
}

/* 标签（tag）样式 */
#profile-template-wrapper .hk-sp-tag {
    display: inline-block;
    background: var(--color-bg-light);
    color: var(--color-text-main);
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.85rem;
    transition: all 250ms ease;
    cursor: pointer;
    border: 1px solid transparent;
}

#profile-template-wrapper .hk-sp-tag:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

#profile-template-wrapper .hk-sp-tag.active {
    background: var(--color-primary);
    color: white;
}

/* 评级星星交互 */
#profile-template-wrapper .hk-sp-rating {
    display: flex;
    gap: 4px;
    cursor: pointer;
}

#profile-template-wrapper .hk-sp-star {
    font-size: 24px;
    transition: all 200ms ease;
    cursor: pointer;
    color: #ddd;
}

#profile-template-wrapper .hk-sp-star:hover,
#profile-template-wrapper .hk-sp-star.active {
    color: goldenrod;
    transform: scale(1.2) rotate(15deg);
}

/* 进度条动画 */
#profile-template-wrapper .hk-sp-progress {
    height: 6px;
    background: var(--color-bg-light);
    border-radius: 3px;
    overflow: hidden;
}

#profile-template-wrapper .hk-sp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #5bc0de);
    border-radius: 3px;
    transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* 信息提示（Toast/Alert）动画 */
#profile-template-wrapper .hk-sp-alert {
    animation: slideInUp 300ms cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 300ms ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#profile-template-wrapper .hk-sp-alert:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 模态框淡入效果 */
#profile-template-wrapper .hk-sp-modal {
    animation: modalFadeIn 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 分页按钮交互 */
#profile-template-wrapper .hk-sp-pagination {
    display: flex;
    gap: 8px;
}

#profile-template-wrapper .hk-sp-pagination a,
#profile-template-wrapper .hk-sp-pagination button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 250ms ease;
    cursor: pointer;
    background: var(--color-bg-white);
    color: var(--color-text-main);
}

#profile-template-wrapper .hk-sp-pagination a:hover,
#profile-template-wrapper .hk-sp-pagination button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

#profile-template-wrapper .hk-sp-pagination .active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* 加载骨架屏 */
#profile-template-wrapper .hk-sp-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 工具提示 (Tooltip) */
#profile-template-wrapper .hk-sp-tooltip {
    position: relative;
}

#profile-template-wrapper .hk-sp-tooltip:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--color-text-dark);
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 250ms ease;
    margin-bottom: 8px;
    z-index: 1000;
}

#profile-template-wrapper .hk-sp-tooltip:hover:after {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   OPTION 4: 图表可视化
   ======================================== */

/* 图表容器 */
#profile-template-wrapper .hk-sp-chart-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    background: var(--color-bg-white);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 1px solid var(--color-border);
    transition: all 300ms ease;
}

#profile-template-wrapper .hk-sp-chart-container:hover {
    box-shadow: 0 4px 12px rgba(70, 130, 180, 0.1);
}

/* 图表标题 */
#profile-template-wrapper .hk-sp-chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

/* 图表图例 */
#profile-template-wrapper .hk-sp-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-bg-light);
}

#profile-template-wrapper .hk-sp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    transition: color 250ms ease;
}

#profile-template-wrapper .hk-sp-legend-item:hover {
    color: var(--color-primary);
}

#profile-template-wrapper .hk-sp-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* 柱状图/条形图 */
#profile-template-wrapper .hk-sp-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 250px;
}

#profile-template-wrapper .hk-sp-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--color-primary), #5bc0de);
    border-radius: 4px 4px 0 0;
    transition: all 250ms ease;
    position: relative;
    overflow: hidden;
}

#profile-template-wrapper .hk-sp-bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(70, 130, 180, 0.2);
}

#profile-template-wrapper .hk-sp-bar:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: barShine 2s infinite;
}

@keyframes barShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 饼图/环形图 */
#profile-template-wrapper .hk-sp-pie-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

#profile-template-wrapper .hk-sp-pie-svg {
    width: 200px;
    height: 200px;
    animation: pieRotate 20s linear infinite;
}

@keyframes pieRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#profile-template-wrapper .hk-sp-pie-svg circle {
    transition: stroke-width 250ms ease;
}

#profile-template-wrapper .hk-sp-pie-svg circle:hover {
    stroke-width: 8;
    filter: brightness(1.1);
}

/* 折线图 */
#profile-template-wrapper .hk-sp-line-chart {
    position: relative;
    width: 100%;
    height: 250px;
}

#profile-template-wrapper .hk-sp-line-path {
    stroke: var(--color-primary);
    stroke-width: 3;
    fill: none;
    animation: lineStroke 1.5s ease-in-out forwards;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

@keyframes lineStroke {
    to {
        stroke-dashoffset: 0;
    }
}

#profile-template-wrapper .hk-sp-line-dot {
    fill: var(--color-primary);
    transition: all 250ms ease;
}

#profile-template-wrapper .hk-sp-line-dot:hover {
    r: 6;
    fill: goldenrod;
}

/* 数据标签 */
#profile-template-wrapper .hk-sp-data-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-bg-light);
    padding: 4px 8px;
    border-radius: 4px;
    animation: labelPop 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes labelPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 图表工具栏 */
#profile-template-wrapper .hk-sp-chart-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-end;
}

#profile-template-wrapper .hk-sp-chart-btn {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg-white);
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 250ms ease;
    font-size: 0.85rem;
}

#profile-template-wrapper .hk-sp-chart-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

#profile-template-wrapper .hk-sp-chart-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* 响应式图表 */
@media (max-width: 820px) {
    #profile-template-wrapper .hk-sp-chart-container {
        padding: 16px;
    }
    
    #profile-template-wrapper .hk-sp-pie-svg {
        width: 150px;
        height: 150px;
    }
    
    #profile-template-wrapper .hk-sp-chart-legend {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Mobile: stack scholarship boxes vertically */
    #profile-template-wrapper #scholarship .hk-sp-scholarship-boxes {
        display: grid;
        grid-template-columns: 1fr;
    }
    
    /* Mobile: stack fees sections vertically */
    #profile-template-wrapper #fees .hk-sp-fees-sections {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ========================================
   OPTION 7: PDF导出
   ======================================== */

/* PDF导出按钮 */
#profile-template-wrapper .hk-sp-pdf-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #e8f4f8;
    color:steelblue;
    border: 1px solid #bce0fd;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

#profile-template-wrapper .hk-sp-pdf-export-btn:hover {
    background: #e8f4f8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.3);
}

#profile-template-wrapper .hk-sp-pdf-export-btn:active {
    transform: translateY(0);
}

#profile-template-wrapper .hk-sp-pdf-export-btn:before {
    content: '📄';
    font-size: 16px;
}

/* PDF导出进度 */
#profile-template-wrapper .hk-sp-pdf-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(211, 47, 47, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 300ms ease;
}

#profile-template-wrapper .hk-sp-pdf-progress.active {
    opacity: 1;
}

#profile-template-wrapper .hk-sp-pdf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d32f2f, #ff6f00);
    width: 0;
    animation: progressBar 2s ease-in-out;
}

@keyframes progressBar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* 打印样式 */
@media print {
    html,
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ensure backgrounds/colors are not stripped in print */
    #profile-template-wrapper,
    #profile-template-wrapper * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide global theme header/footer/nav */
    body > header,
    body > footer,
    #masthead,
    #colophon,
    header.site-header,
    footer.site-footer {
        display: none !important;
    }

    /* Hide non-print parts inside profile */
    #profile-template-wrapper .hk-sp-no-print,
    #profile-template-wrapper .hk-sp-chart-toolbar,
    #profile-template-wrapper .hk-sp-pdf-export-btn,
    #profile-template-wrapper nav,
    #profile-template-wrapper .navigation,
    #profile-template-wrapper .comments-area,
    #profile-template-wrapper .related-posts,
    #profile-template-wrapper .hk-sp-toc-col,
    #profile-template-wrapper .hk-sp-toc,
    #profile-template-wrapper .hk-sp-toc-placeholder,
    #profile-template-wrapper .hk-sp-sources {
        display: none !important;
    }

    /* Do not append URLs after links */
    #profile-template-wrapper a[href]:after {
        content: '' !important;
    }

    /* Print header on every page */
    #profile-template-wrapper .hk-sp-print-only {
        display: block !important;
    }

    #profile-template-wrapper .hk-sp-print-header {
        position: fixed;
        top: 8mm;
        left: 0;
        right: 0;
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14mm;
        background: transparent;
        border-bottom: 0;
        pointer-events: none;
    }

    /* User request: remove per-page school name + logo */
    #profile-template-wrapper .hk-sp-print-only,
    #profile-template-wrapper .hk-sp-print-header {
        display: none !important;
    }

    /* Logo goes to top-right in print */
    #profile-template-wrapper .hk-sp-print-header-left {
        order: 2;
        display: flex;
        justify-content: flex-end;
    }

    #profile-template-wrapper .hk-sp-print-header-right {
        order: 1;
    }

    #profile-template-wrapper .hk-sp-print-logo {
        height: 10mm;
        width: auto;
        display: block;
    }

    #profile-template-wrapper .hk-sp-print-header-right {
        font-weight: var(--font-weight-bold);
        color: var(--color-text-dark);
        font-size: 0.95rem;
    }

    /* Center content when TOC is hidden */
    #profile-template-wrapper {
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    #profile-template-wrapper .hk-sp-layout {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* Keep Header + Overview together */
    #profile-template-wrapper .hk-sp-header {
        break-after: avoid;
        page-break-after: avoid;
    }

    #profile-template-wrapper #overview {
        break-before: avoid;
        page-break-before: avoid;
    }

    /* Placement: each H4 starts on a new page */
    #profile-template-wrapper #placement h4 {
        break-before: page;
        page-break-before: always;
    }

    #profile-template-wrapper #placement h4:first-of-type {
        break-before: auto;
        page-break-before: auto;
    }

    /* FAQ accordion: keep question text white in print (matches expanded/active web state) */
    #profile-template-wrapper button[class^="faq-accordion-header-"] span[class^="faq-question-text-"] {
        color: #fff !important;
    }

    #profile-template-wrapper button[class^="faq-accordion-header-"] span[class^="faq-accordion-icon-"] {
        color: #fff !important;
    }

    /* Keep table header colors (blue bg + white text) */
    #profile-template-wrapper table thead tr:first-child > th,
    #profile-template-wrapper table thead tr:first-child > td,
    #profile-template-wrapper table tr:first-child > th {
        background-color: var(--color-primary, #007cba) !important;
        color: #fff !important;
    }

    #profile-template-wrapper table thead tr:first-child > th *,
    #profile-template-wrapper table thead tr:first-child > td *,
    #profile-template-wrapper table tr:first-child > th * {
        color: #fff !important;
    }

    @page {
        margin: 14mm;
    }
}

/* Print-only elements are hidden on screen */
#profile-template-wrapper .hk-sp-print-only {
    display: none;
}

/* PDF预览样式 */
#profile-template-wrapper .hk-sp-pdf-preview {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 16px 0;
}

#profile-template-wrapper .hk-sp-pdf-page {
    background: white;
    margin-bottom: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* PDF导出选项面板 */
#profile-template-wrapper .hk-sp-pdf-options {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    animation: slideDown 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

#profile-template-wrapper .hk-sp-pdf-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.95rem;
}

#profile-template-wrapper .hk-sp-pdf-options label:last-child {
    margin-bottom: 0;
}

#profile-template-wrapper .hk-sp-pdf-options input[type="checkbox"] {
    cursor: pointer;
}

/* 响应式PDF导出 */
@media (max-width: 820px) {
    #profile-template-wrapper .hk-sp-header .hk-sp-pdf-export-btn {
        width: 100%;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
        margin-top: var(--spacing-xl);
    }
    
    #profile-template-wrapper .hk-sp-pdf-page {
        padding: 20px;
    }
}
