/**
 * Staff Grid with Popup - Styles
 * 
 * CSS for the staff grid layout and popup modals
 * 
 * @package StaffGridPopup
 * @since 1.0.0
 */

/* ===================================
   Grid Layout Styles
   =================================== */

.sgp-staff-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
    width: 100%;
}

/* Column variations */
.sgp-staff-grid.sgp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sgp-staff-grid.sgp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.sgp-staff-grid.sgp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Staff Card Styles */
.sgp-staff-card {
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sgp-staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.sgp-staff-image {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.sgp-staff-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.sgp-staff-image:hover img {
    transform: scale(1.05);
}

/* Hover Overlay */
.sgp-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.3s ease;
}

.sgp-staff-image:hover .sgp-overlay {
    opacity: 1;
}

.sgp-view-details {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sgp-view-details:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Content Area */
.sgp-staff-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sgp-staff-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333333;
    line-height: 1.3;
}

.sgp-staff-position {
    font-size: 16px;
    color: #666666;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.sgp-staff-excerpt {
    font-size: 14px;
    color: #777777;
    line-height: 1.6;
    margin-top: 12px;
}

/* No Staff Message */
.sgp-no-staff {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #999999;
}

/* ===================================
   Popup Modal Styles
   =================================== */

.sgp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.sgp-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.sgp-popup-container {
    background: #ffffff;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sgp-popup-overlay.active .sgp-popup-container {
    transform: scale(1);
}

/* Close Button */
.sgp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sgp-popup-close:hover {
    background: #ffffff;
    transform: rotate(90deg);
}

.sgp-popup-close svg {
    width: 20px;
    height: 20px;
    color: #333333;
}

/* Popup Image Section */
.sgp-popup-image {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.sgp-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Header Overlay on Image */
.sgp-popup-header-overlay {
    position: absolute;
    bottom: 30px;
    left: 0px;
}
.sgp-popup-header-overlay h2.sgp-popup-title {
    display: block;
    padding: 8px 17px;
    margin: 0px;
    color: #fafafa;
    background: #b3bf35;
    font-size: 32px;
    line-height: 40px;
}
.sgp-popup-header-overlay p.sgp-popup-position {
    background: #2C3E50;
    font-size: 18px;
    line-height: 18px;
    font-weight: 500;
    padding: 7px 17px !important;
    color: #fafafa;
    display: inline-block;
    margin-top: 20px;
}

/* Popup Body */
.sgp-popup-body {
    padding: 30px;
}

/* Social Links */
.sgp-social-links {
    background: #2C3E50;
    text-align: center;
}
.sgp-social-links a {
    display: inline-block;
    padding: 20px 17px;
    color: #fafafa;
    transition-property: all;
    transition-duration: .3s;
}
.sgp-social-link.sgp-facebook:hover {
    background-color: #145dbf;
}

.sgp-social-link.sgp-linkedin:hover {
    background-color: #084a8f;
}

.sgp-social-link.sgp-twitter:hover {
    background-color: #0d8bd9;
}

.sgp-social-link svg {
    width: 20px;
    height: 20px;
}

/* Description */
.sgp-popup-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444444;
    margin-bottom: 25px;
}

.sgp-popup-description p {
    margin-bottom: 15px;
}

.sgp-popup-description p:last-child {
    margin-bottom: 0;
}

/* Contact Info */
.sgp-contact-info {
    display: block;
    margin: 0;
    padding: 20px 17px;
    list-style: none;
    text-align: left;
    font-size: 14px;
    background: #2C3E50;
}
.sgp-contact-info a{
    color: #fafafa;
    text-decoration: none;
    transition-property: all;
    transition-duration: .3s;
}
.sgp-contact-info svg {
    flex-shrink: 0;
    color: #fafafa;
}
.sgp-contact-info p{
    display: flex;
    align-items: center;
    gap: 5px;
}
/* Body No Scroll (when popup is open) */
body.sgp-popup-open {
    overflow: hidden;
}

/* ===================================
   Responsive Styles
   =================================== */

/* Tablet (768px and below) */
@media (max-width: 980px) {
    .sgp-staff-grid.sgp-columns-3,
    .sgp-staff-grid.sgp-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sgp-staff-grid {
        gap: 20px;
    }
    
    .sgp-popup-title {
        font-size: 28px;
    }
    
    .sgp-popup-position {
        font-size: 16px;
    }
}

/* Mobile (600px and below) */
@media (max-width: 600px) {
    .sgp-staff-grid.sgp-columns-2,
    .sgp-staff-grid.sgp-columns-3,
    .sgp-staff-grid.sgp-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .sgp-staff-grid {
        gap: 15px;
        margin: 20px 0;
    }
    
    .sgp-staff-content {
        padding: 20px;
    }
    
    .sgp-staff-title {
        font-size: 20px;
    }
    
    .sgp-staff-position {
        font-size: 14px;
    }
    
    .sgp-popup-container {
        max-height: 95vh;
        margin: 10px;
    }
    
    .sgp-popup-body {
        padding: 20px;
    }
    
    .sgp-popup-title {
        font-size: 24px;
    }
    
    .sgp-popup-position {
        font-size: 14px;
    }
    
    .sgp-popup-header-overlay {
        
    }
    
    .sgp-social-links {
        justify-content: center;
    }
}

/* Extra Small Mobile (400px and below) */
@media (max-width: 400px) {
    .sgp-view-details {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .sgp-popup-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}
