/* ===== Trainer CSS ===== */
:root {
    --primary: #2A3B4C;
    --primary-light: #3E5A6F;
    --secondary: #6B5B95;
    --accent: #C44569;
    --accent-light: #E6A4B4;
    --success: #2E7D5E;
    --warning: #E6B800;
    --dark: #1A2634;
    --light: #F5F7FA;
    --gray-100: #F8FAFD;
    --gray-200: #E9ECF0;
    --gray-300: #DDE1E7;
    --gradient-1: linear-gradient(135deg, #2A3B4C, #3E5A6F);
    --gradient-2: linear-gradient(135deg, #6B5B95, #C44569);
    --gradient-3: linear-gradient(135deg, #2E7D5E, #6B5B95);
    --gradient-4: linear-gradient(135deg, #E6A4B4, #C44569);
}

/* ===== Main Container Spacing ===== */
main.container {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ===== Trainer Hero Section (Detail Page) ===== */
.trainer-hero {
    background: linear-gradient(135deg, #1A2634 0%, #2A3B4C 50%, #3E5A6F 100%);
    min-height: 500px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 2rem;
    padding: 4rem 0;
    border-radius: 20px;
}

.trainer-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(198, 69, 105, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(107, 91, 149, 0.15) 0%, transparent 40%),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 6px);
}

.trainer-shape-1 {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: floatShape1 20s infinite;
}

.trainer-shape-2 {
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    animation: floatShape2 25s infinite reverse;
}

@keyframes floatShape1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-30px, 30px) rotate(240deg); }
}

@keyframes floatShape2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(40px, 40px) rotate(180deg); }
}

/* ===== Trainers Hero Section (List Page) ===== */
.trainers-hero {
    background: linear-gradient(135deg, #1A2634 0%, #2A3B4C 50%, #3E5A6F 100%);
    min-height: 350px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 4rem 0;
    border-radius: 20px;
}

.trainers-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(198, 69, 105, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(107, 91, 149, 0.15) 0%, transparent 50%);
}

.trainers-shape-1 {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.trainers-shape-2 {
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Profile Image */
.trainer-profile-image-wrapper {
    position: relative;
    display: inline-block;
}

.trainer-profile-image {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    border-radius: 50%;
}

.trainer-profile-image:hover {
    transform: scale(1.02);
    border-color: rgba(255,255,255,0.3);
}

.trainer-default-avatar {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #6B5B95, #C44569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    border: 5px solid rgba(255,255,255,0.2);
    border-radius: 50%;
}

.verified-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #2E7D5E;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Trainer Badges */
.trainer-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 60px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.trainer-title {
    color: rgba(255,255,255,0.9);
    font-size: 1.3rem;
}

/* ===== Filter Section - FIXED (No extra space above) ===== */
.filter-section {
    background: white;
    border-radius: 60px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-top: -1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
    font-size: 1.1rem;
}

.search-wrapper .form-control {
    padding-left: 3rem;
    height: 56px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.search-wrapper .form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.25rem rgba(107, 91, 149, 0.1);
}

/* ===== Main Content Container - Reduced padding ===== */
.container.py-4 {
    padding-top: 0.5rem;
    padding-bottom: 2rem;
}

/* ===== Results Header ===== */
.results-header {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* ===== About Section ===== */
.gradient-text {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.expertise-tag {
    padding: 0.5rem 1.2rem;
    background: var(--gray-100);
    color: var(--secondary);
    border-radius: 60px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.expertise-tag:hover {
    background: var(--gradient-2);
    color: white;
    transform: translateY(-2px);
}

/* ===== Courses Section ===== */
.course-card {
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.course-image-default {
    height: 180px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.course-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===== Contact List ===== */
.contact-list li {
    padding: 0.5rem 0;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(107, 91, 149, 0.1), rgba(198, 69, 105, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.contact-list li:hover .contact-icon {
    background: var(--gradient-2);
    color: white;
    transform: scale(1.1);
}

/* ===== Institutes List ===== */
.institute-item {
    padding: 0.8rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.institute-item:hover {
    background: var(--gray-100);
}

.default-institute-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(107, 91, 149, 0.1), rgba(198, 69, 105, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

/* ===== Share Links ===== */
.share-link {
    width: 45px;
    height: 45px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-link:hover {
    background: var(--gradient-2);
    color: white;
    transform: translateY(-3px);
}

/* ===== Trainer Card (List Page) ===== */
.trainer-card {
    transition: all 0.3s ease;
}

.trainer-card:hover {
    transform: translateY(-5px);
}

.trainer-card .card {
    overflow: hidden;
}

.trainer-card-header {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.trainer-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trainer-card:hover .trainer-card-image {
    transform: scale(1.1);
}

.trainer-card-default {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.trainer-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    pointer-events: none;
}

/* Expertise Preview */
.expertise-preview .badge {
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    transition: all 0.3s ease;
}

.expertise-preview .badge:hover {
    background: var(--gradient-2) !important;
    color: white !important;
}

/* ===== Pagination ===== */
.pagination .page-link {
    border: none;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.2rem;
    color: var(--primary);
    font-weight: 500;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--gradient-2);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-2);
    color: white;
}

/* ===== Empty State ===== */
.empty-state-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .trainer-profile-image,
    .trainer-default-avatar {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 992px) {
    main.container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .trainer-profile-image,
    .trainer-default-avatar {
        width: 200px;
        height: 200px;
    }
    
    .trainer-profile-image-wrapper {
        margin-bottom: 2rem;
    }
    
    .trainers-hero {
        margin-bottom: 0.75rem;
    }
    
    .trainer-hero {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    main.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .trainer-hero {
        min-height: 400px;
        padding: 3rem 0;
        border-radius: 15px;
        margin-bottom: 1rem;
    }
    
    .trainers-hero {
        min-height: 300px;
        padding: 3rem 0;
        border-radius: 15px;
        margin-bottom: 0.5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .filter-section {
        border-radius: 40px;
        padding: 0.6rem 1.25rem;
        margin-top: -0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .search-wrapper .form-control {
        height: 48px;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 15px;
        font-size: 1rem;
    }
    
    .search-wrapper .form-control {
        padding-left: 2.5rem;
    }
    
    .trainer-card-header {
        height: 180px;
    }
    
    .container.py-4 {
        padding-top: 0.25rem;
    }
}

@media (max-width: 576px) {
    main.container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .trainer-hero {
        min-height: 350px;
        padding: 2rem 0;
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }
    
    .trainers-hero {
        min-height: 280px;
        padding: 2rem 0;
        border-radius: 12px;
        margin-bottom: 0.25rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .trainer-profile-image,
    .trainer-default-avatar {
        width: 150px;
        height: 150px;
    }
    
    .verified-badge {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        bottom: 10px;
        right: 10px;
    }
    
    .filter-section {
        border-radius: 30px;
        padding: 0.5rem 1rem;
        margin-top: -0.5rem;
        margin-bottom: 1rem;
    }
    
    .search-wrapper .form-control {
        height: 44px;
        font-size: 0.85rem;
    }
    
    .search-icon {
        left: 12px;
        font-size: 0.9rem;
    }
    
    .search-wrapper .form-control {
        padding-left: 2.2rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .results-header {
        margin-bottom: 1rem;
    }
    
    .results-header h2 {
        font-size: 1.1rem;
    }
    
    .trainer-card-header {
        height: 160px;
    }
    
    .trainer-card .card-body {
        padding: 1rem;
    }
    
    .trainer-card h5 {
        font-size: 1rem;
    }
    
    .container.py-4 {
        padding-top: 0;
    }
}

/* Small devices (400px and below) */
@media (max-width: 400px) {
    main.container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .trainers-hero .display-4,
    .trainer-hero .display-4 {
        font-size: 1.6rem;
    }
    
    .trainers-hero .lead,
    .trainer-hero .lead {
        font-size: 0.9rem;
    }
    
    .hero-badge .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .filter-section {
        padding: 0.4rem 0.75rem;
        margin-top: -0.35rem;
        margin-bottom: 0.75rem;
    }
    
    .search-wrapper .form-control {
        height: 40px;
        font-size: 0.8rem;
    }
    
    .search-icon {
        left: 10px;
        font-size: 0.8rem;
    }
    
    .search-wrapper .form-control {
        padding-left: 2rem;
    }
    
    .trainer-badge {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* ===== Animations ===== */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slideInUp {
    animation: slideInUp 0.6s ease;
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease;
}

/* ===== Loading States ===== */
.loading-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Hide Scrollbar ===== */
html, body {
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

/* ===== Print Styles ===== */
@media print {
    .trainer-hero,
    .trainers-hero,
    .filter-section,
    .pagination,
    .share-link {
        display: none !important;
    }
    
    main.container {
        padding: 0 !important;
        margin: 0 !important;
    }
}