/* ========================================
   AGENT PROFILE PAGE - PREMIUM COMPACT STYLES
   Waisaka Property - Premium & Compact Design
   ======================================== */

/* ----------------------------------------
   CSS Variables
   ---------------------------------------- */
:root {
    --agent-primary: #6D4038;
    --agent-secondary: #8D6E66;
    --agent-gold: #C5A14F;
    --agent-success: #25D366;
    --agent-bg-light: #F8F9FA;
    --agent-text-dark: #2D3436;
    --agent-text-muted: #636E72;
    --agent-card-shadow: 0 4px 20px rgba(109, 64, 56, 0.1);
    --agent-card-hover-shadow: 0 8px 30px rgba(109, 64, 56, 0.15);
}

/* ----------------------------------------
   Hero Section - Premium Compact
   ---------------------------------------- */
.agent-hero {
    background: linear-gradient(135deg, #6D4038 0%, #8D6E66 50%, #A08078 100%);
    position: relative;
    padding: 24px 0;
    overflow: hidden;
    width: 100%;
}

.agent-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 20h20v20H20V20zm0-20h20v20H20V0zM0 20h20v20H0V20zM0 0h20v20H0V0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}

.agent-hero-content {
    position: relative;
    z-index: 1;
}

.agent-hero-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    box-shadow: var(--agent-card-shadow);
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ----------------------------------------
   Agent Profile - Compact Layout
   ---------------------------------------- */
.agent-profile-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.agent-photo-container {
    position: relative;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(109, 64, 56, 0.04) 0%, transparent 100%);
}

.agent-photo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.agent-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.agent-verified-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
    border: 2px solid white;
}

/* ----------------------------------------
   Agent Info - Compact
   ---------------------------------------- */
.agent-info {
    padding: 20px 24px;
    flex: 1;
}

.agent-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--agent-gold);
    font-weight: 600;
    margin-bottom: 4px;
}

.agent-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--agent-text-dark);
    margin-bottom: 6px;
    line-height: 1.2;
}

.agent-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--agent-text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.agent-location i {
    color: var(--agent-primary);
    font-size: 0.8rem;
}

.agent-member-since {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(109, 64, 56, 0.06) 0%, rgba(141, 110, 102, 0.06) 100%);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    color: var(--agent-primary);
    font-weight: 500;
}

.agent-member-since i {
    color: var(--agent-gold);
    font-size: 0.7rem;
}

/* ----------------------------------------
   Agent Rating - Compact
   ---------------------------------------- */
.agent-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 10px;
}

.agent-rating i {
    color: #FFB800;
    font-size: 0.85rem;
}

.agent-rating i.empty {
    color: #E0E0E0;
}

.agent-rating-text {
    margin-left: 6px;
    font-size: 0.75rem;
    color: var(--agent-text-muted);
}

/* ----------------------------------------
   Agent Actions - Compact Buttons
   ---------------------------------------- */
.agent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.agent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.agent-btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25);
}

.agent-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.35);
    color: white;
}

.agent-btn-call {
    background: linear-gradient(135deg, var(--agent-primary) 0%, var(--agent-secondary) 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(109, 64, 56, 0.25);
}

.agent-btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(109, 64, 56, 0.35);
    color: white;
}

.agent-btn-email {
    background: white;
    color: var(--agent-text-dark);
    border: 1.5px solid #E0E0E0;
}

.agent-btn-email:hover {
    border-color: var(--agent-primary);
    color: var(--agent-primary);
    transform: translateY(-2px);
}

/* ----------------------------------------
   Statistics Section - Compact Grid
   ---------------------------------------- */
.agent-stats-section {
    background: white;
    padding: 24px 0;
    border-bottom: 1px solid #EAEAEA;
}

.agent-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.agent-stat-card {
    text-align: center;
    padding: 16px 12px;
    background: linear-gradient(135deg, rgba(109, 64, 56, 0.02) 0%, rgba(141, 110, 102, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(109, 64, 56, 0.06);
    transition: all 0.25s ease;
}

.agent-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--agent-card-shadow);
}

.agent-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--agent-primary) 0%, var(--agent-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: white;
    font-size: 1.1rem;
}

.agent-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--agent-text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.agent-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--agent-text-muted);
    font-weight: 500;
}

/* ----------------------------------------
   Area Specialist - Compact Tags
   ---------------------------------------- */
.agent-areas-section {
    background: white;
    padding: 24px 0;
    border-bottom: 1px solid #EAEAEA;
}

.agent-areas-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--agent-text-dark);
    margin-bottom: 16px;
}

.agent-area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-area-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(109, 64, 56, 0.04) 0%, rgba(141, 110, 102, 0.04) 100%);
    border: 1px solid rgba(109, 64, 56, 0.08);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--agent-text-dark);
    text-decoration: none;
    transition: all 0.25s ease;
}

.agent-area-tag:hover {
    background: var(--agent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(109, 64, 56, 0.2);
}

.agent-area-tag .count {
    background: var(--agent-gold);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.agent-area-tag:hover .count {
    background: white;
    color: var(--agent-primary);
}

/* ----------------------------------------
   Property Types - Compact Pills
   ---------------------------------------- */
.agent-property-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.property-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--agent-text-dark);
}

.property-type-tag i {
    color: var(--agent-primary);
    font-size: 0.7rem;
}

/* ----------------------------------------
   Listings Section - Compact Header
   ---------------------------------------- */
.agent-listings-section {
    background: var(--agent-bg-light);
    padding: 24px 0 40px;
}

.agent-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.agent-listings-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--agent-text-dark);
    margin: 0;
}

.agent-listings-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.agent-filter-select {
    padding: 10px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: white;
    font-size: 0.8rem;
    color: var(--agent-text-dark);
    cursor: pointer;
    min-width: 130px;
    transition: all 0.25s ease;
}

.agent-filter-select:focus {
    border-color: var(--agent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(109, 64, 56, 0.08);
}

/* ----------------------------------------
   Property Cards - Compact Premium
   ---------------------------------------- */
.agent-property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.agent-property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.agent-property-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--agent-card-hover-shadow);
}

.agent-property-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.agent-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.agent-property-card:hover .agent-property-image img {
    transform: scale(1.05);
}

.agent-property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-property-badge.for-sale {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
}

.agent-property-badge.for-rent {
    background: linear-gradient(135deg, #1565C0 0%, #1E88E5 100%);
    color: white;
}

.agent-property-content {
    padding: 14px 16px;
}

.agent-property-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--agent-primary);
    margin-bottom: 4px;
}

.agent-property-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agent-text-dark);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.agent-property-location {
    font-size: 0.75rem;
    color: var(--agent-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.agent-property-location i {
    font-size: 0.7rem;
}

.agent-property-specs {
    display: flex;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #EAEAEA;
}

.agent-property-spec {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--agent-text-muted);
}

.agent-property-spec i {
    color: var(--agent-primary);
    font-size: 0.7rem;
}

/* Property Card Footer */
.agent-property-footer {
    display: flex;
    border-top: 1px solid #EAEAEA;
}

.agent-property-footer a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.agent-property-footer .btn-wa {
    background: rgba(37, 211, 102, 0.06);
    color: #25D366;
}

.agent-property-footer .btn-wa:hover {
    background: #25D366;
    color: white;
}

.agent-property-footer .btn-call {
    background: rgba(109, 64, 56, 0.06);
    color: var(--agent-primary);
}

.agent-property-footer .btn-call:hover {
    background: var(--agent-primary);
    color: white;
}

/* ----------------------------------------
   Sticky Contact Bar (Mobile)
   ---------------------------------------- */
.agent-sticky-contact {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 16px;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.agent-sticky-contact.visible {
    transform: translateY(0);
}

.agent-sticky-contact-inner {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.agent-sticky-contact .agent-btn {
    flex: 1;
    padding: 12px;
    font-size: 0.8rem;
}

/* ----------------------------------------
   Pagination - Compact
   ---------------------------------------- */
.agent-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
}

.agent-pagination .page-item .page-link {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #E0E0E0;
    color: var(--agent-text-dark);
    background: white;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.agent-pagination .page-item.active .page-link,
.agent-pagination .page-item .page-link:hover {
    background: var(--agent-primary);
    border-color: var(--agent-primary);
    color: white;
}

.agent-pagination .page-item.disabled .page-link {
    background: #F5F5F5;
    color: #BDBDBD;
}

/* ----------------------------------------
   Responsive Design - Compact
   ---------------------------------------- */
@media (max-width: 991px) {
    .agent-hero {
        padding: 20px 0;
    }

    .agent-hero-card .row {
        flex-direction: column;
    }

    .agent-photo-container {
        padding: 20px;
    }

    .agent-photo-wrapper {
        width: 100px;
        height: 100px;
    }

    .agent-info {
        padding: 16px 20px;
        text-align: center;
    }

    .agent-name {
        font-size: 1.3rem;
    }

    .agent-location {
        justify-content: center;
    }

    .agent-actions {
        justify-content: center;
    }

    .agent-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .agent-property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .agent-sticky-contact {
        display: block;
    }
}

@media (max-width: 575px) {
    .agent-hero {
        padding: 16px 0;
    }

    .agent-photo-container {
        padding: 16px;
    }

    .agent-photo-wrapper {
        width: 80px;
        height: 80px;
    }

    .agent-verified-badge {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
        bottom: 2px;
        right: 2px;
    }

    .agent-info {
        padding: 12px 16px;
    }

    .agent-name {
        font-size: 1.2rem;
    }

    .agent-btn {
        padding: 10px 14px;
        font-size: 0.75rem;
        flex: 1;
    }

    .agent-stats-section {
        padding: 16px 0;
    }

    .agent-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .agent-stat-card {
        padding: 12px 8px;
    }

    .agent-stat-number {
        font-size: 1.3rem;
    }

    .agent-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .agent-stat-label {
        font-size: 0.65rem;
    }

    .agent-areas-section {
        padding: 16px 0;
    }

    .agent-areas-section h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .agent-area-tag {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .agent-listings-section {
        padding: 16px 0 30px;
    }

    .agent-listings-header h2 {
        font-size: 1.1rem;
    }

    .agent-property-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .agent-listings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .agent-listings-filters {
        width: 100%;
    }

    .agent-filter-select {
        flex: 1;
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .agent-property-content {
        padding: 12px 14px;
    }

    .agent-property-price {
        font-size: 1rem;
    }

    .agent-property-title {
        font-size: 0.85rem;
    }
}

/* ----------------------------------------
   No Data State
   ---------------------------------------- */
.agent-no-data {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--agent-card-shadow);
}

.agent-no-data i {
    font-size: 3rem;
    color: #E0E0E0;
    margin-bottom: 16px;
}

.agent-no-data h4 {
    font-size: 1.1rem;
    color: var(--agent-text-dark);
    margin-bottom: 8px;
}

.agent-no-data p {
    font-size: 0.85rem;
    color: var(--agent-text-muted);
    margin-bottom: 16px;
}

/* ----------------------------------------
   Property Card with Agent Info (Search/Listing)
   ---------------------------------------- */
.agent-property-footer {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid #EAEAEA;
    padding: 10px 12px;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.property-agent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.property-agent-info .agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.property-agent-info .agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-agent-info .agent-details {
    min-width: 0;
    line-height: 1.2;
}

.property-agent-info .agent-details small {
    display: block;
    font-size: 0.6rem;
    color: var(--agent-text-muted);
}

.property-agent-info .agent-details span {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--agent-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.property-contact-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.property-contact-btns a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.property-contact-btns .btn-wa {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
}

.property-contact-btns .btn-wa:hover {
    background: #25D366;
    color: white;
}

.property-contact-btns .btn-call {
    background: rgba(109, 64, 56, 0.1);
    color: var(--agent-primary);
}

.property-contact-btns .btn-call:hover {
    background: var(--agent-primary);
    color: white;
}

/* View Count Overlay */
.property-view-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-view-count i {
    color: #4CAF50;
}

/* ----------------------------------------
   Global Property Grid (for Search/Index)
   ---------------------------------------- */
.property-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .property-grid-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 575px) {
    .property-grid-compact {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .property-agent-info .agent-details span {
        max-width: 80px;
    }

    .property-contact-btns {
        flex-direction: row;
    }
}