/* =========================================
   Speakers Manager - Public Styles
   Fully Responsive: Mobile, Tablet, Desktop
   ========================================= */

/* Container - Full Width Support */
.sm-speakers-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Category Sections */
.sm-category-section {
    margin-bottom: 60px;
    text-align: center;
}

.sm-category-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 40px;
    position: static;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 20px 0;
    display: block;
    text-align: center;
    color: #000;
    letter-spacing: 0.02em;
}

.sm-category-title::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #4ab3a2;
}

/* Speakers Grid - Responsive */
.sm-speakers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 30px;
    margin-bottom: 50px;
}

/* Speaker Card */
.sm-speaker-card {
    flex: 0 1 280px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px 15px;
    border-radius: 12px;
    background: transparent;
}

.sm-speaker-card:hover {
    transform: translateY(-8px);
}

/* Speaker Image */
.sm-speaker-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}

.sm-speaker-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f1f1f1;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sm-speaker-card:hover .sm-speaker-image {
    border-color: #4ab3a2;
    box-shadow: 0 8px 25px rgba(74, 179, 162, 0.25);
}

.sm-no-image {
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Company Logo Badge */
.sm-speaker-company-logo-wrapper {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    border: 2px solid #f1f1f1;
    overflow: hidden;
}

.sm-speaker-company-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Speaker Name & Description */
.sm-speaker-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 12px 0 8px;
    color: #1a1a1a;
    line-height: 1.3;
}

.sm-speaker-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    max-width: 250px;
    margin: 0 auto;
}

/* =========================================
   Modal Styles
   ========================================= */
body.sm-modal-open {
    overflow: hidden;
}

#sm-speaker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#sm-speaker-modal.sm-modal-active {
    display: flex;
}

.sm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.sm-modal-container {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 850px;
    max-height: calc(100vh - 40px);
    border-radius: 16px;
    overflow-y: auto;
    padding: 45px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    z-index: 1;
}

.sm-modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 32px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    transition: color 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.sm-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.sm-modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
}

.sm-modal-left {
    flex: 0 0 220px;
    text-align: center;
}

.sm-modal-right {
    flex: 1;
    min-width: 280px;
}

.sm-modal-image {
    width: 220px;
    height: 220px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.sm-modal-company-logo {
    max-width: 140px;
    height: auto;
    margin-top: 15px;
}

.sm-modal-name {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 18px;
    color: #000;
    font-weight: 800;
    line-height: 1.2;
}

.sm-modal-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.sm-modal-full-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

.sm-modal-contact {
    font-size: 0.95rem;
}

.sm-modal-contact a {
    color: #4ab3a2;
    text-decoration: none;
}

.sm-modal-contact a:hover {
    text-decoration: underline;
}

/* =========================================
   TABLET / IPAD (768px - 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .sm-speakers-grid {
        gap: 35px 25px;
    }
    
    .sm-speaker-card {
        max-width: 260px;
    }
    
    .sm-speaker-image {
        width: 160px;
        height: 160px;
    }
    
    .sm-speaker-company-logo-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .sm-category-title {
        font-size: 2.2rem;
        margin-bottom: 35px;
    }
    
    .sm-speaker-name {
        font-size: 1.25rem;
    }
    
    .sm-modal-container {
        padding: 35px;
    }
    
    .sm-modal-image {
        width: 200px;
        height: 200px;
    }
    
    .sm-modal-left {
        flex: 0 0 200px;
    }
}

/* =========================================
   SMALL TABLET / IPAD PORTRAIT (768px)
   ========================================= */
@media (max-width: 768px) {
    .sm-speakers-container {
        padding: 15px;
    }
    
    .sm-speakers-grid {
        gap: 25px 20px;
    }
    
    .sm-speaker-card {
        max-width: 100%;
        padding: 15px 10px;
    }
    
    .sm-category-title {
        font-size: 1.9rem;
        margin-bottom: 30px;
    }
    
    .sm-category-section {
        margin-bottom: 45px;
    }
    
    .sm-speaker-name {
        font-size: 1.15rem;
    }
    
    .sm-speaker-desc {
        font-size: 0.9rem;
    }
    
    .sm-speaker-image {
        width: 140px;
        height: 140px;
    }
    
    .sm-speaker-company-logo-wrapper {
        width: 45px;
        height: 45px;
        padding: 5px;
    }
    
    /* Modal adjustments */
    .sm-modal-container {
        padding: 30px 25px;
        max-height: calc(100vh - 30px);
    }
    
    .sm-modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    
    .sm-modal-left {
        flex: none;
        width: 100%;
    }
    
    .sm-modal-right {
        min-width: 100%;
        text-align: left;
    }
    
    .sm-modal-image {
        width: 180px;
        height: 180px;
    }
    
    .sm-modal-name {
        font-size: 1.75rem;
        text-align: center;
    }
}

/* =========================================
   MOBILE PHONES (< 480px)
   ========================================= */
@media (max-width: 480px) {
    .sm-speakers-container {
        padding: 10px;
    }
    
    .sm-speakers-grid {
        gap: 20px 15px;
    }
    
    .sm-category-title {
        font-size: 1.6rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .sm-category-section {
        margin-bottom: 35px;
    }
    
    .sm-speaker-card {
        padding: 12px 8px;
    }
    
    .sm-speaker-image {
        width: 130px;
        height: 130px;
        border-width: 3px;
    }
    
    .sm-speaker-company-logo-wrapper {
        width: 40px;
        height: 40px;
        padding: 4px;
    }
    
    .sm-speaker-name {
        font-size: 1.1rem;
        margin: 10px 0 6px;
    }
    
    .sm-speaker-desc {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    /* Modal - Full screen on mobile */
    #sm-speaker-modal {
        padding: 10px;
    }
    
    .sm-modal-container {
        padding: 25px 18px;
        border-radius: 12px;
        max-height: calc(100vh - 20px);
    }
    
    .sm-modal-close {
        top: 12px;
        right: 14px;
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
    
    .sm-modal-image {
        width: 150px;
        height: 150px;
        border-radius: 12px;
    }
    
    .sm-modal-name {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .sm-modal-desc {
        font-size: 1rem;
    }
    
    .sm-modal-company-logo {
        max-width: 120px;
        margin-top: 10px;
    }
    
    .sm-modal-full-text {
        font-size: 0.95rem;
    }
}

/* =========================================
   VERY SMALL PHONES (< 360px)
   ========================================= */
@media (max-width: 360px) {
    .sm-category-title {
        font-size: 1.4rem;
    }
    
    .sm-speaker-image {
        width: 110px;
        height: 110px;
    }
    
    .sm-speaker-company-logo-wrapper {
        width: 35px;
        height: 35px;
    }
    
    .sm-speaker-name {
        font-size: 1rem;
    }
    
    .sm-modal-container {
        padding: 20px 15px;
    }
    
    .sm-modal-image {
        width: 120px;
        height: 120px;
    }
    
    .sm-modal-name {
        font-size: 1.35rem;
    }
}

/* =========================================
   LARGE DESKTOP (> 1400px)
   ========================================= */
@media (min-width: 1400px) {
    .sm-speakers-container {
        max-width: 1600px;
        padding: 30px 40px;
    }
    
    .sm-speakers-grid {
        gap: 50px 40px;
    }
    
    .sm-speaker-card {
        max-width: 320px;
    }
    
    .sm-speaker-image {
        width: 200px;
        height: 200px;
    }
    
    .sm-speaker-company-logo-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .sm-category-title {
        font-size: 2.8rem;
    }
    
    .sm-speaker-name {
        font-size: 1.45rem;
    }
}

/* =========================================
   Utility & Accessibility
   ========================================= */
.sm-speaker-card:focus {
    outline: 2px solid #4ab3a2;
    outline-offset: 4px;
}

/* Smooth scrolling for modal content */
.sm-modal-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent text selection on clickable cards */
.sm-speaker-card {
    -webkit-user-select: none;
    user-select: none;
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    .sm-speaker-card:hover {
        transform: none;
    }
    
    .sm-speaker-card:active {
        transform: scale(0.98);
    }
}

/* WordPress Admin Bar Offset */
.admin-bar .sm-category-title {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .sm-category-title {
        top: 46px;
    }
}
