/**
 * Agents Grid Styles
 * 
 * @package Pro Estate Agents
 */

/* Agents Grid Widget */
.agents-grid-widget {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Section */
.agents-grid-header {
    text-align: center;
    margin-bottom: 50px;
}

.agents-grid-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}

.agents-grid-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Agents Grid */
.agents-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

/* Grid Columns */
.agents-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.agents-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.agents-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.agents-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Agent Card */
.agent-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(121, 16, 147, 0.15);
    border-color: #791093;
}

/* Agent Image */
.agent-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.agent-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.agent-card:hover .agent-image img {
    transform: scale(1.05);
}

/* Agent Content */
.agent-content {
    padding: 25px;
}

/* Agent Name */
.agent-name {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.agent-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.agent-name a:hover {
    color: #791093;
}

/* Agent Position */
.agent-position {
    color: #791093;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 15px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(121, 16, 147, 0.1) 0%, rgba(121, 16, 147, 0.05) 100%);
    border-radius: 20px;
    display: inline-block;
}

/* Agent Details */
.agent-expertise,
.agent-experience {
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.agent-expertise strong,
.agent-experience strong {
    color: #555;
    font-weight: 600;
}

.agent-expertise,
.agent-experience {
    color: #666;
}

/* Agent Excerpt */
.agent-excerpt {
    margin: 15px 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

/* Agent Contact */
.agent-contact {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.agent-contact a:hover {
    background: #791093;
    color: #ffffff;
    transform: translateX(5px);
}

.agent-contact a svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* Agent Social */
.agent-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.agent-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.agent-social a:hover {
    background: #791093;
    color: #ffffff;
    transform: translateY(-2px);
}

.agent-social a svg {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .agents-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .agents-grid-widget {
        padding: 30px 15px;
    }
    
    .agents-grid-header h2 {
        font-size: 2rem;
    }
    
    .agents-grid-header p {
        font-size: 1rem;
    }
    
    .agents-grid[data-columns="3"],
    .agents-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .agents-grid {
        gap: 20px;
    }
    
    .agent-content {
        padding: 20px;
    }
    
    .agent-name {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .agents-grid[data-columns="2"],
    .agents-grid[data-columns="3"],
    .agents-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .agents-grid-header h2 {
        font-size: 1.8rem;
    }
    
    .agent-image img {
        height: 200px;
    }
    
    .agent-content {
        padding: 15px;
    }
    
    .agent-contact {
        flex-direction: column;
    }
    
    .agent-social {
        justify-content: center;
    }
}

/* Loading Animation */
.agents-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Empty State */
.agents-grid:empty::after {
    content: 'No agents found.';
    display: block;
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Hover Effects */
.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #791093 0%, #9c27b0 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.agent-card:hover::before {
    transform: scaleX(1);
}

/* Focus States */
.agent-name a:focus,
.agent-contact a:focus,
.agent-social a:focus {
    outline: 2px solid #791093;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .agents-grid-widget {
        padding: 0;
    }
    
    .agent-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .agent-card:hover {
        transform: none;
    }
    
    .agent-social {
        display: none;
    }
}
