/* --- Compact Teaser (Top Widget) --- */
.trainer-teaser {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-left: 4px solid #26CBC5; /* Accent color */
    padding: 20px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.trainer-teaser-img {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e1e1e1;
    flex-shrink: 0; /* Prevent shrinking */
}

.trainer-teaser-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%; /* Shift view up to show the forehead */
    display: block;
}

.trainer-teaser-content {
    flex: 1;
    min-width: 0; /* Fix flex child overflow issues */
}

.trainer-teaser-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.trainer-teaser-text {
    font-size: 0.95em;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.trainer-teaser-btn {
    display: inline-block;
    margin-top: 8px;
    color: #26CBC5;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
    border-bottom: 1px dashed #26CBC5;
}

.trainer-teaser-btn:hover {
    color: #000;
    border-bottom-style: solid;
}

/* --- Modal Popup --- */
.trainer-modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.trainer-modal-container {
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    padding: 40px;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.trainer-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.trainer-modal-close:hover {
    color: #26CBC5;
}

/* --- Trainer Section (Full Info in Modal) --- */
.trainer-section {
    margin: 0;
    padding: 0;
    border: none;
}

.trainer-section h3 {
    margin-bottom: 25px;
    font-size: 24px;
    text-align: left;
    clear: both;
}

.trainer-content {
    display: block; /* Block display to allow floating */
}

.trainer-content::after {
    content: "";
    display: table;
    clear: both;
}

.trainer-image {
    float: left;
    margin-right: 30px;
    margin-bottom: 15px;
    width: 220px;
}

.trainer-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.trainer-bio {
    /* No specialized styles needed for wrapping text, standard block behavior works */
}

.trainer-bio p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.6;
}

.trainer-bio p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Fix Teaser on Mobile */
    .trainer-teaser {
        flex-direction: row; /* Keep image side-by-side */
        text-align: left;
        align-items: flex-start;
        padding: 15px;
        gap: 15px;
    }
    
    .trainer-teaser-img {
        flex: 0 0 60px; /* Smaller image on mobile */
        height: 60px;
        margin-bottom: 0;
    }

    .trainer-teaser-title {
        font-size: 1em;
    }
    
    .trainer-teaser-text {
        font-size: 0.9em;
    }

    /* Modal adjustments */
    .trainer-modal-container {
        padding: 25px 20px;
    }
    
    .trainer-section h3 {
        font-size: 20px;
        padding-right: 20px; /* Space for close button */
    }

    /* On very small screens, unfloat the image in modal if needed, 
       but keeping float often works fine if image is small enough. 
       Let's reduce modal image size slightly for mobile wrapping. */
    .trainer-image {
        width: 140px; 
        margin-right: 20px;
    }
}