/* SWAPNOJOYI Professors Directory Structural and Premium Theme Design Styles */

.s-dir-container {
    --brand-teal: #123326;
    --brand-teal-light: #f4fcf8;
    --brand-accent: #FFDC4A;
    --brand-accent-glow: rgba(255, 220, 74, 0.15);
    --surface-white: #ffffff;
    --border-gray: #e2e8f0;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 15px;
    box-sizing: border-box;
}

.s-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Ultimate Interactive Global Network Hero with Cloud Drift Animations */
.s-premium-hero {
    position: relative;
    border-radius: 20px;
    padding: 90px 40px;
    text-align: center;
    background: linear-gradient(135deg, #123326 0%, #1e5c43 100%);
    color: #ffffff;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(18, 51, 38, 0.18);
}

.s-hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
}

.s-hero-radial-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 220, 74, 0.08) 0%, transparent 70%);
    z-index: 2;
    pointer-events: none;
}

/* Customizable Logo styles inside the Hero */
.s-hero-logo-container {
    display: inline-block;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
}

.s-hero-custom-logo {
    max-height: 80px;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

/* Drifting Cloud Animations */
.s-cloud {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.s-cloud-1 {
    width: 400px;
    height: 180px;
    top: 10%;
    left: -200px;
    animation: driftCloudOne 42s linear infinite;
}

.s-cloud-2 {
    width: 320px;
    height: 150px;
    bottom: 15%;
    right: -200px;
    animation: driftCloudTwo 36s linear infinite;
}

@keyframes driftCloudOne {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(110vw) scale(1.15); }
    100% { transform: translateX(0) scale(1); }
}

@keyframes driftCloudTwo {
    0% { transform: translateX(0) scale(1.1); }
    50% { transform: translateX(-110vw) scale(0.9); }
    100% { transform: translateX(0) scale(1.1); }
}

.s-hero-content-wrapper {
    position: relative;
    z-index: 3;
    max-width: 820px;
    margin: 0 auto;
}

.s-hero-tagline {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--brand-accent);
    display: inline-block;
    margin-bottom: 18px;
    background: rgba(255, 220, 74, 0.12);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 220, 74, 0.25);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.s-hero-title {
    font-size: 46px;
    font-weight: 850;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.s-hero-subtitle {
    font-size: 18px;
    opacity: 0.92;
    line-height: 1.6;
    margin: 0;
    color: #e2f8f5;
    font-weight: 400;
}

/* Quick Region Scroller bar */
.s-quick-country-scroller {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background: var(--brand-teal-light);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(18, 51, 38, 0.08);
}

.s-quick-country-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-teal);
    white-space: nowrap;
}

.s-quick-countries-flex {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.s-quick-countries-flex::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.s-quick-country-badge {
    background: #ffffff;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.s-quick-country-badge:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal);
    background: var(--brand-teal-light);
}

.s-quick-country-badge.s-active {
    background: var(--brand-teal);
    color: #ffffff;
    border-color: var(--brand-teal);
}

/* Layout Split Panel */
.s-main-grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 60px;
}

/* Sidebar Search & Filters */
.s-sidebar {
    background: var(--surface-white);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    position: sticky;
    top: 100px;
}

.s-filter-header-mobile {
    display: none;
}

.s-search-box-wrapper {
    margin-bottom: 25px;
}

.s-search-field {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.s-search-field:focus {
    border-color: var(--brand-teal);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(18, 51, 38, 0.08);
}

.s-filter-group {
    margin-bottom: 22px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 22px;
}

.s-filter-label {
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0 0 10px 0;
}

.s-select-filter {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.s-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.s-checkbox-label input {
    width: 17px;
    height: 17px;
    accent-color: var(--brand-teal);
}

.s-clear-filters-btn {
    width: 100%;
    padding: 11px;
    border: 1px solid #cbd5e1;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.s-clear-filters-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

/* Results Content */
.s-results-container {
    display: flex;
    flex-direction: column;
}

.s-toolbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.s-result-count {
    font-size: 15px;
    color: var(--text-muted);
}

.s-result-count span {
    font-weight: 700;
    color: var(--text-primary);
}

.s-mobile-filter-trigger {
    display: none;
}

/* Chips UI */
.s-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.s-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.s-remove-chip {
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-muted);
    font-size: 11px;
}

.s-clear-all-chips-btn {
    background: transparent;
    border: none;
    color: var(--brand-teal);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 5px;
}

/* Cards Grid Layout */
.s-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Professor Cards Style */
.s-card {
    background: var(--surface-white);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.s-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(18, 51, 38, 0.06);
}

.s-card-featured {
    border-color: #e2e8f0;
    background: linear-gradient(180deg, #fbfcfb 0%, #ffffff 100%);
    box-shadow: 0 6px 20px rgba(255, 220, 74, 0.05);
}

.s-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.s-card-meta-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.s-card-country-badge {
    font-size: 12px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: #475569;
}

.s-badge-featured {
    font-size: 11px;
    background: #fef3c7;
    color: #d97706;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.s-save-prof-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #94a3b8;
    line-height: 1;
    padding: 4px;
    transition: transform 0.15s ease;
}

.s-save-prof-btn:hover {
    transform: scale(1.15);
}

.s-save-prof-btn.s-saved {
    color: #eab308;
}

.s-card-name {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.3;
    color: var(--brand-teal);
}

.s-card-position {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 0 12px 0;
}

.s-card-uni-dept {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.s-card-uni {
    font-weight: 650;
    color: #334155;
}

.s-card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s-card-domain {
    display: flex;
    flex-direction: column;
}

.s-label-small {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.s-domain-pill {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-teal);
}

.s-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: none;
}

.s-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.s-btn-outline {
    background: transparent;
    border: 1px solid var(--border-gray);
    color: var(--text-primary);
}

.s-btn-outline:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal);
    background-color: var(--brand-teal-light);
}

.s-bg-accent {
    background-color: var(--brand-teal);
    color: #ffffff;
}

.s-bg-accent:hover {
    background-color: #1e5c43;
    transform: translateY(-1px);
}

/* Modals General Styling */
.s-profile-modal-overlay,\n.s-login-modal-overlay,\n.s-recommend-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.s-profile-modal-overlay.s-active,\n.s-login-modal-overlay.s-active,\n.s-recommend-modal-overlay.s-active {
    opacity: 1;
    pointer-events: auto;
}

/* Profile Detail Drawer (Slides from Right) */
.s-profile-drawer-container {
    width: 100%;
    max-width: 650px;
    background: var(--surface-white);
    height: 100%;
    box-shadow: -15px 0 40px rgba(18, 51, 38, 0.08);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.s-profile-modal-overlay.s-active .s-profile-drawer-container {
    transform: translateX(0);
}

.s-close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.s-close-modal-btn:hover {
    background: #e2e8f0;
}

.s-drawer-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.s-drawer-hero {
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 25px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

.s-profile-drawer-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    color: var(--brand-teal);
}

.s-profile-drawer-subtitle {
    font-size: 16px;
    color: #475569;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.s-profile-drawer-institution {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Tabs UI */
.s-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-gray);
    margin-bottom: 25px;
    gap: 15px;
}

.s-tab-trigger {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
}

.s-tab-trigger.s-active {
    color: var(--brand-teal);
    border-bottom-color: var(--brand-teal);
}

.s-tabs-content .s-tab-pane {
    display: none;
}

.s-tabs-content .s-tab-pane.s-active {
    display: block;
}

.s-section-block {
    margin-bottom: 25px;
}

.s-section-block h4 {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
    color: var(--brand-teal);
}

.s-tab-p-text {
    line-height: 1.6;
    color: #475569;
    font-size: 15px;
    margin: 0;
}

.s-meta-pair {
    font-size: 14px;
    margin-bottom: 10px;
}

.s-blur-restricted {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.s-blurry-txt {
    filter: blur(4px);
    user-select: none;
    opacity: 0.5;
}

.s-unlock-btn {
    background: var(--brand-teal);
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.s-links-holder-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s-link-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.s-scholar { background: #eff6ff; color: #1d4ed8; }
.s-gate { background: #fdf2f8; color: #be185d; }
.s-in { background: #f0f9ff; color: #0369a1; }
.s-web { background: #f5f5f4; color: #44403c; }

.s-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.s-tag {
    font-size: 12px;
    background: var(--brand-teal-light);
    color: var(--brand-teal);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.s-profile-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
    color: #475569;
}

.s-profile-list li {
    margin-bottom: 8px;
}

.s-drawer-sticky-footer {
    border-top: 1px solid var(--border-gray);
    padding: 20px 40px;
    background: var(--surface-white);
}

.s-drawer-sticky-footer .s-btn {
    width: 100%;
}

/* Center Dialog Modals */
.s-login-modal-overlay,\n.s-recommend-modal-overlay {
    justify-content: center;
    align-items: center;
}

.s-login-dialog,\n.s-recommend-dialog {
    background: var(--surface-white);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.s-login-dialog h3,\n.s-recommend-dialog h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-teal);
}

.s-dialog-subtext {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.s-login-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.s-login-actions .s-btn {
    flex: 1;
}

/* Recommendation Form */
.s-form-field {
    margin-bottom: 15px;
}

.s-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 6px;
}

.s-form-field input,\n.s-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.s-form-field input:focus,\n.s-form-field textarea:focus {
    border-color: var(--brand-teal);
}

.s-feedback-message {
    margin-top: 15px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.s-feedback-message.success { color: #10b981; }
.s-feedback-message.error { color: #ef4444; }

/* Pagination Navigation Style */
.s-pagination-block {
    margin-top: 40px;
}

.s-pagination-list {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.s-pagination-list .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.s-pagination-list .page-numbers.current,\n.s-pagination-list .page-numbers:hover {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #fff;
}

/* Skeleton Loading styles */
.s-skeleton-card {
    background: #f8fafc;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 24px;
}

.s-skel-line {
    background: #e2e8f0;
    border-radius: 4px;
    animation: skel-pulse 1.5s infinite ease-in-out;
}

.s-skel-badge { width: 40%; height: 16px; margin-bottom: 15px; }
.s-skel-title { width: 80%; height: 22px; margin-bottom: 10px; }
.s-skel-subtitle { width: 60%; height: 14px; margin-bottom: 25px; }
.s-skel-pill { width: 30%; height: 16px; }

@keyframes skel-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.s-empty-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.s-empty-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.s-empty-notice h4 {
    font-size: 18px;
    margin: 0 0 10px 0;
}

.s-empty-notice p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* Admin Bar Fixes */
body.admin-bar .s-profile-modal-overlay,\nbody.admin-bar .s-login-modal-overlay,\nbody.admin-bar .s-recommend-modal-overlay {
    top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .s-profile-modal-overlay,\n    body.admin-bar .s-login-modal-overlay,\n    body.admin-bar .s-recommend-modal-overlay {
        top: 46px;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .s-main-grid-layout {
        grid-template-columns: 1fr;
    }

    .s-sidebar {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: 320px;
        z-index: 10000;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-radius: 0;
    }

    .s-sidebar.s-drawer-open {
        transform: translateX(0);
    }

    .s-filter-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-gray);
        padding-bottom: 15px;
    }

    .s-filter-header-mobile h3 {
        margin: 0;
    }

    .s-mobile-filter-trigger {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .s-premium-hero {
        padding: 50px 20px;
    }

    .s-hero-title {
        font-size: 32px;
    }

    .s-cards-grid {
        grid-template-columns: 1fr;
    }

    .s-drawer-scrollable {
        padding: 20px;
    }

    .s-drawer-sticky-footer {
        padding: 15px 20px;
    }
}
