/**
 * IO Team QR - Frontend Styles
 * Hover effects for team member display (Divi integration)
 */

/* Team Member Card Container */
.io-team-member-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    max-width: 333px;
    width: 100%;
}

.io-team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Image Wrapper */
.io-team-member-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 150.15%; /* 333x500px = 500/333 = 1.5015 */
    overflow: hidden;
    background: #f0f0f0;
}

/* Team Member Image */
.io-team-member-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.io-team-member-card:hover .io-team-member-image {
    transform: scale(1.1) translateZ(0);
    filter: brightness(0.6) contrast(1.1);
}

/* Overlay Container */
.io-team-member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.io-team-member-card:hover .io-team-member-overlay {
    opacity: 1;
}

/* Overlay Content */
.io-team-member-info {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.io-team-member-card:hover .io-team-member-info {
    transform: translateY(0);
}

/* Name */
.io-team-member-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: white;
    line-height: 1.2;
}

/* Title / Qualification */
.io-team-member-title {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 8px 0;
    color: #e0e0e0;
    opacity: 0.85;
    font-style: italic;
}

/* Position */
.io-team-member-position {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #f0f0f0;
    opacity: 0.9;
}

/* Contact Information */
.io-team-member-email,
.io-team-member-phone,
.io-team-member-mobile {
    font-size: 14px;
    margin: 8px 0;
    line-height: 1.6;
}

.io-team-member-email a,
.io-team-member-phone a,
.io-team-member-mobile a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}

.io-team-member-email a:hover,
.io-team-member-phone a:hover,
.io-team-member-mobile a:hover {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Actions */
.io-team-member-actions {
    margin-top: 15px;
}

.io-team-member-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.io-team-member-link:hover {
    background: white;
    color: #667eea;
    border-color: white;
    transform: translateY(-2px);
}

/* Grid Layout */
.io-team-members-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .io-team-member-name {
        font-size: 20px;
    }

    .io-team-member-position {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .io-team-members-grid {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .io-team-member-card {
        max-width: 100%;
    }

    .io-team-member-name {
        font-size: 18px;
    }

    .io-team-member-position {
        font-size: 13px;
    }

    .io-team-member-email,
    .io-team-member-phone,
    .io-team-member-mobile {
        font-size: 13px;
    }
}

/* Divi Builder Specific Adjustments */
.et_pb_column .io-team-member-card {
    margin-bottom: 0;
}

.et_pb_row .io-team-members-grid {
    margin: 0;
}

/* Animation for better UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.io-team-member-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Different animation delays for grid items */
.io-team-member-card:nth-child(1) { animation-delay: 0s; }
.io-team-member-card:nth-child(2) { animation-delay: 0.1s; }
.io-team-member-card:nth-child(3) { animation-delay: 0.2s; }
.io-team-member-card:nth-child(4) { animation-delay: 0.3s; }
.io-team-member-card:nth-child(5) { animation-delay: 0.4s; }
.io-team-member-card:nth-child(6) { animation-delay: 0.5s; }