/* COBCE Leaders - Professional Frontend Styles */

.cobce-leaders-grid {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

/* Responsive Grid System */
.cobce-leaders-grid[data-columns="1"] {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin: 1.5rem auto;
}

.cobce-leaders-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    margin: 1.5rem auto;
}

.cobce-leaders-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
    /*max-width: 1000px;*/
    /*margin: 1.5rem auto;*/
}

.cobce-leaders-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 1.5rem auto;
}

.cobce-leaders-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1400px;
    margin: 1.5rem auto;
}

.cobce-leaders-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
    max-width: 1600px;
    margin: 1.5rem auto;
}

/* Responsive Breakpoints */
@media (max-width: 1400px) {
    .cobce-leaders-grid[data-columns="6"] {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .cobce-leaders-grid[data-columns="5"],
    .cobce-leaders-grid[data-columns="6"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .cobce-leaders-grid[data-columns="4"],
    .cobce-leaders-grid[data-columns="5"],
    .cobce-leaders-grid[data-columns="6"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cobce-leaders-grid[data-columns="3"],
    .cobce-leaders-grid[data-columns="4"],
    .cobce-leaders-grid[data-columns="5"],
    .cobce-leaders-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cobce-leaders-grid {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .cobce-leader-image,
    .cobce-placeholder-image {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .cobce-leaders-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0;
    }
}

/* Leader Card Styles */
.cobce-leader-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cobce-leader-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 115, 170, 0.2);
}

/* Image Container */
.cobce-leader-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.cobce-leader-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cobce-leader-card:hover .cobce-leader-image img {
    transform: scale(1.08);
}

/* Placeholder Image */
.cobce-placeholder-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cobce-placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(255,255,255,0.1)"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') center/60px no-repeat;
}

.cobce-placeholder-image .dashicons {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Clickable Card Styles */
.cobce-leader-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cobce-leader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Video indicator for cards with videos */
.cobce-leader-card[data-video-url]::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgb(53 26 85 / 86%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
    z-index: 5;
    transition: all 0.3s ease;
}

.cobce-leader-card[data-video-url]::before {
    content: '▶';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    z-index: 6;
    transition: all 0.3s ease;
}

.cobce-leader-card[data-video-url]:hover::after {
    background: rgba(0, 115, 170, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.5);
}

.cobce-leader-card[data-video-url]:hover::before {
    transform: scale(1.1);
}

/* Leader Info */
.cobce-leader-info {
    padding: 1.5rem 1.25rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cobce-leader-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.cobce-leader-position {
    font-size: 0.9rem;
    color: #666666;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Video Popup Styles */
.cobce-video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cobce-video-popup.show {
    opacity: 1;
    visibility: visible;
}

.cobce-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.cobce-popup-content {
    position: relative;
    width: 95vw;
    height: 95vh;
    max-width: 95vw;
    max-height: 95vh;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: cobcePopupIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes cobcePopupIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cobce-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.cobce-popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.cobce-popup-close .dashicons {
    font-size: 24px;
}

.cobce-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cobce-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Video Thumbnail */
.cobce-video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.cobce-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cobce-video-thumbnail:hover img {
    transform: scale(1.05);
}

.cobce-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.cobce-video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.6);
}

.cobce-video-play-button {
    width: 120px;
    height: 120px;
    background: rgba(0, 115, 170, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 115, 170, 0.5);
    animation: cobcePulse 2s infinite;
}

.cobce-video-play-overlay:hover .cobce-video-play-button {
    transform: scale(1.1);
    background: rgba(0, 115, 170, 1);
    box-shadow: 0 15px 50px rgba(0, 115, 170, 0.7);
    animation: none;
}

.cobce-video-play-button .dashicons {
    font-size: 52px;
    color: #ffffff;
    margin-left: 6px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.cobce-video-play-overlay:hover .cobce-video-play-button .dashicons {
    transform: scale(1.1);
}

@keyframes cobcePulse {
    0% {
        box-shadow: 0 10px 40px rgba(0, 115, 170, 0.5);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 115, 170, 0.8);
    }
    100% {
        box-shadow: 0 10px 40px rgba(0, 115, 170, 0.5);
    }
}

/* Loading State */
.cobce-video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #ffffff;
    font-size: 16px;
    background: #000000;
}

.cobce-video-loading .dashicons {
    font-size: 32px;
    margin-right: 12px;
    animation: cobceSpin 1s linear infinite;
}

@keyframes cobceSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Thumbnail Loading State */
.cobce-video-thumbnail.loading {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: cobceShimmer 1.5s infinite;
}

.cobce-video-thumbnail.loading img {
    opacity: 0.3;
}

@keyframes cobceShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Body scroll lock */
body.cobce-popup-open {
    overflow: hidden;
}

/* Responsive video popup */
@media (max-width: 768px) {
    .cobce-popup-content {
        width: 98vw;
        height: 98vh;
        max-width: 98vw;
        max-height: 98vh;
        margin: 1vh;
    }
    
    .cobce-popup-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .cobce-popup-close .dashicons {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .cobce-leader-image,
    .cobce-placeholder-image {
        height: 200px;
    }
    
    .cobce-leader-info {
        padding: 1.5rem 1rem;
    }
    
    .cobce-leader-name {
        font-size: 1.25rem;
    }
    
    .cobce-leader-position {
        font-size: 0.9rem;
    }
    
    .cobce-play-button {
        width: 60px;
        height: 60px;
    }
    
    .cobce-play-button .dashicons {
        font-size: 28px;
    }
}

/* Accessibility */
.cobce-leader-card:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.cobce-play-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Video Error Styles */
.cobce-error-button {
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.cobce-error-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

#video-error-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 8px;
    margin: 1rem;
}

#video-error-container h3 {
    color: #ffffff !important;
    font-weight: 600 !important;
}

#video-error-container p {
    color: #cccccc !important;
}

/* Print Styles */
@media print {
    .cobce-leaders-grid {
        display: block;
    }
    
    .cobce-leader-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .cobce-play-button {
        display: none;
    }
}