/* =========================
   General Layout & Utility
   ========================= */
.agent-archive {
    margin: 0 auto;
}

/* =========================
   Agent Filter Form (Search by name & Offices)
   ========================= */
.agent-filter-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2em;
    padding: 0 20px;
}
.agent-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 560px;
    width: 100%;
}
.agent-filter-input,
.agent-filter-select {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    padding: 12px 16px;
    border: 2px solid #e0e4e8;
    border-radius: 8px;
    background: #fff;
    color: #2a2a2a;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.agent-filter-input {
    flex: 1 1 200px;
    min-width: 180px;
}
.agent-filter-input::placeholder {
    color: #6c757d;
}
.agent-filter-input:focus,
.agent-filter-select:focus {
    outline: none;
    border-color: #152d4d;
    box-shadow: 0 0 0 3px rgba(21, 45, 77, 0.12);
}
.agent-filter-select {
    flex: 1 1 200px;
    min-width: 180px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232a2a2a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.agent-filter-submit {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    background: #152d4d;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.agent-filter-submit:hover {
    background: #1a3a6b;
}

.agent-list ul {
    list-style: none;
    padding: 0;
}
.agent-list li {
    margin-bottom: 2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 1em;
}

/* =========================
   Agent List/Grid
   ========================= */
.agent-list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
    margin: 0 auto;
    padding: 0;
    justify-content: center;
    max-width: 1400px;
}
.agent-list-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s;
    max-width:350px;
}
.agent-list-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.agent-thumbnail-link {
    display: block;
    width: 100%;
    max-width: 180px;
    margin: 1em auto 0 auto;
}
.agent-image-container{
    background: #a2aaad;
    width:100%;
    border:3px double #fff;
}
.agent-thumbnail {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1/1;
    overflow: hidden;
    border:3px double #a2aaad;
    background: #a2aaad;
    display: flex;
    align-items: center;
    justify-content: center;
}
.agent-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.agent-no-image {
    min-height: 120px;
}
.agent-info {
    text-align: center;
    width: 100%;
}
.agent-name {
    color: #152d4d;
    text-decoration: none;
    display: block;
    margin: 0;
    padding: 0;
    font-family: Cinzel;
    font-size: 1.2em !important;
    letter-spacing: .3em;
    line-height: 1.3;
    min-height: 3.4em; /* reserve space for up to ~2 lines */
}
.agent-name:hover {
    text-decoration: underline;
}
.agent-meta-label,
.agent-meta-field a {
    color: #152d4d;
}
.agent-meta {
    width: 100%;
    margin-top: 6px;
    margin-left: 10px;
    text-align: left;
}
.agent-meta-field {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.95em;
}
.agent-meta-icon {
    display: inline-flex;
    width: 18px;
    justify-content: center;
}
.agent-meta-label {
    font-weight: 600;
}
.view-profile-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: #152d4d;
    color: #fff;
    padding: 12px 0;
    border-radius: 0;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    transition: background 0.2s;
    border: none;
}
.view-profile-btn:hover {
    background: #1a3a6b;
    color: #fff;
}
.agent-list-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.agent-list {
    position: relative;
}
.agent-list-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}
.agent-list-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ps-grey, #888);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   Agent Profile (Single)
   ========================= */
.single-agent-profile {
    background: #fff;
}
.agent-profile-header {
    display: flex;
    margin-bottom: 1.5em;
    background:#a2aaad;
    border-bottom:50px solid #152d4d;
    padding-left: 50px;
}
.agent-profile-info{
    max-width:1280px;
    width:100%;
    margin: 0 auto;
}
.agent-profile-contact{
    float:left;
    position:relative;
    text-align:left;
    color:#404040;
    font-family: 'Lato', sans-serif;
}
.agent-profile-thumbnail {
    overflow: hidden;
    float:right;
    position:relative;
}
.agent-profile-thumbnail img {
    object-fit: cover;
    display: block;
}
.agent-profile-name {
    font-family: 'Cinzel', serif !important;
    font-size: 2em !important;
    margin: 0 0 0.25em 0;
    margin-bottom: 0 !important;
    color:#404040;
    font-weight: 400;
}
.agent-profile-position{
    margin:0 0 0.5em 0;
    font-size:1.3em;
    color:#404040;
}
.agent-profile-office{
    margin:0.5em 0 1em;
    margin-left: 12px;
    color:#404040;
}
.agent-profile-office-address{
    margin-top:0.25em;
}
.agent-profile-content {
    max-width:1280px;
    font-family: 'Lato', sans-serif;
    font-size: 1.08em;
    color: #444;
    margin: 0 auto;
    margin-bottom: 1.5em;
}
.agent-profile-content p{
    margin:0 0 1em 0;
}
.agent-profile-details {
    border-radius: 8px;
}
.agent-profile-details h2 {
    font-size: 1.1em;
    margin: 0 0 0.7em 0;
    font-family: 'Cinzel', serif;
    color: #333;
}
.agent-profile-details ul {
    list-style: none;
    padding: 0 0 0 12px;
    margin: 0;
}
.agent-profile-details li {
    margin-bottom: 0.7em;
    font-size: 1em;
    color: #404040;
}
.agent-profile-name{
    border:unset !important;
    background:unset;
}
.agent-listing-widget-area{
	max-width:1280px;
    margin: 0 auto;
    margin-bottom: 1.5em;	
}

/* Agent Active/Sold Listings grid - multiple cards per row */
.agent-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
@media (max-width: 1200px) {
    .agent-listings-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    .agent-listings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .agent-listings-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* =========================
   QR Code & vCard Download
   ========================= */
.agent-qr-container {
    display: inline-block;
    padding: 12px;
    border: 3px solid var(--darkColor, #152d4d);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(21,45,77,0.18);
    background: #fff;
}
.agent-qr-img {
    background: transparent;
    display: block;
    border-radius: 0;
    max-width: 100%;
    height: auto;
}
.agent-vcard-download {
    display: none;
}

/* =========================
   Agent Directory Admin (Backend)
   ========================= */
.agent-details-label {
    display: inline-block;
    width: 50px;
    min-width: 50px;
    margin-right: 10px;
    font-weight: 600;
    vertical-align: middle;
}
.agent-details-input {
    width: calc(100% - 70px);
    max-width: 400px;
    display: inline-block;
    vertical-align: middle;
}
#agent_details p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

/* =========================
   Responsive/Media Queries
   ========================= */
@media (max-width: 1200px) {
    .agent-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .agent-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .agent-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .agent-filter-input,
    .agent-filter-select {
        min-width: 100%;
    }
    .agent-filter-submit {
        width: 100%;
    }
}
@media (max-width: 600px) {
    .agent-vcard-download {
        display: inline-block;
        padding: 12px 24px;
        background: var(--darkColor, #152d4d);
        color: #fff;
        border-radius: 6px;
        text-decoration: none;
        font-weight: bold;
        font-size: 1.1em;
        margin-bottom: 12px;
        transition: background 0.2s, color 0.2s;
    }
    .agent-vcard-download:hover {
        background: #1a3a6b;
        color: #fff;
        text-decoration: underline;
    }
    .agent-qr-container {
        display: none;
    }
    .agent-profile-header {
        flex-direction: column;
        align-items: center;
        padding-left: 0;
        border-bottom-width: 20px;
    }
    .agent-profile-thumbnail {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-bottom: 1em;
        display: block;
        text-align: center;
    }
    .agent-profile-thumbnail img {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: cover;
		border-bottom:20px solid var(--darkColor, #152d4d);
    }
    .agent-profile-contact {
        float: none;
        width: 100%;
        text-align: center;
        margin-bottom: 1em;
    }
} 
.agent-phone-link {
  display: inline-block;
  padding: 0;
  font-size: 1em;
  color: #404040;
  text-decoration: underline;
  border-radius: 0;
  transition: background 0.2s;
}
.agent-phone-link:hover,
.agent-phone-link:focus {
  background: #f0f4fa;
}
@media (max-width: 600px) {
  .agent-phone-link {
    width: auto;
    text-align: left;
    font-size: 1em;
    padding: 0;
  }
} 
.agent-profile-details-list {
  list-style: none;
  padding: 0 0 0 10px;
  margin: 0 0 0 12px; /* indent contact info list without indenting the h3 */
}
.agent-profile-detail {
  margin-bottom: 0.25em;
  padding: 0.2em 0;
  font-size: 1.08em;
  color: #404040;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.agent-profile-detail strong {
 
  font-weight: 600;
  color: #404040;
 
}
.agent-email-link {
  color: #404040;
  text-decoration: underline;
  font-weight: 400;
}

/* Social buttons in single agent contact block */
.agent-profile-social {
  margin-top: 0.4em;
  display: inline-block;
  margin-right: 6px;
}
.agent-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 57px;
  padding: 0;
  margin-right: 6px;
  border-radius: 0;
  text-decoration: none;
  overflow: hidden;
  position: relative;
}
.agent-social-btn:hover {
  opacity: 0.9;
}
.agent-social-icon {
  display: none;
}
.agent-social-label {
  display: none; /* hide text label; icon is visual */
}

/* Use real logo icons from theme assets via masks so the icon is white */
.agent-social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60%;
  height: 60%;
  background-color: #fff; /* icon color */
}

.agent-social-facebook {
  background-color: #1877f2;
}
.agent-social-facebook::before {
  -webkit-mask: url('/wp-content/themes/pall-spera-co/assets/icons/facebook.svg') center/contain no-repeat;
          mask: url('/wp-content/themes/pall-spera-co/assets/icons/facebook.svg') center/contain no-repeat;
}

.agent-social-instagram {
  background-color: #e1306c;
}
.agent-social-instagram::before {
  -webkit-mask: url('/wp-content/themes/pall-spera-co/assets/icons/instagram.svg') center/contain no-repeat;
          mask: url('/wp-content/themes/pall-spera-co/assets/icons/instagram.svg') center/contain no-repeat;
}

.agent-social-pinterest {
  background-color: #bd081c;
}
.agent-social-pinterest::before {
  -webkit-mask: url('/wp-content/themes/pall-spera-co/assets/icons/pinterest.svg') center/contain no-repeat;
          mask: url('/wp-content/themes/pall-spera-co/assets/icons/pinterest.svg') center/contain no-repeat;
}

.agent-social-youtube {
  background-color: #ff0000;
}
.agent-social-youtube::before {
  -webkit-mask: url('/wp-content/themes/pall-spera-co/assets/icons/youtube.svg') center/contain no-repeat;
          mask: url('/wp-content/themes/pall-spera-co/assets/icons/youtube.svg') center/contain no-repeat;
}

.agent-social-linkedin {
  background-color: #0a66c2;
}
.agent-social-linkedin::before {
  -webkit-mask: url('/wp-content/themes/pall-spera-co/assets/icons/linkedin.svg') center/contain no-repeat;
          mask: url('/wp-content/themes/pall-spera-co/assets/icons/linkedin.svg') center/contain no-repeat;
}

.agent-social-twitter {
  background-color: #000000;
}
.agent-social-twitter::before {
  -webkit-mask: url('/wp-content/themes/pall-spera-co/assets/icons/twitter.svg') center/contain no-repeat;
          mask: url('/wp-content/themes/pall-spera-co/assets/icons/twitter.svg') center/contain no-repeat;
}
