/* ============================================
   Agent Detail Page - Estilos Modernos
   ============================================ */

:root {
    --remax-blue: #003DA5;
    --remax-red: #E11B22;
    --remax-dark: #002764;
    --success-green: #00AB4A;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #e5e5e5;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #F5F5F5;
}

/* ============================================
   Container
   ============================================ */
.agent-detail-page {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    padding: 40px 0 80px;
    min-height: 70vh;
}

.agent-detail-page .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Agent Header Section
   ============================================ */
.agent-header {
    margin-bottom: 0;
}

.agent-layout {
    width: 100%;
    display: block;
}

.agent-layout::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   Agent Info Card - Diseño Moderno
   ============================================ */
.agent-layout .agent-info-card {
    float: left;
    width: 380px;
    margin-right: 40px;
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    transition: all 0.3s ease;
}

.agent-info-card:hover {
    box-shadow: 0 12px 32px rgba(0, 61, 165, 0.15);
}

/* Agent Photo */
.agent-photo {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--bg-gray);
    position: relative;
}

.agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.agent-info-card:hover .agent-photo img {
    transform: scale(1.03);
}

.agent-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--remax-blue) 0%, var(--remax-dark) 100%);
    position: relative;
}

.agent-photo-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(255,255,255,0.03)" width="100" height="100"/></svg>');
    opacity: 0.5;
}

.agent-photo-placeholder span {
    font-family: 'Poppins', sans-serif;
    font-size: 120px;
    font-weight: 700;
    color: var(--bg-white);
    opacity: 0.95;
    position: relative;
    z-index: 2;
}

/* Agent Info */
.agent-info {
    padding: 32px 28px 24px;
    text-align: center;
    background: var(--bg-white);
}

.agent-name {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.agent-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--remax-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px 0;
}

.agency-logo {
    max-width: 140px;
    height: auto;
    margin: 16px 0 24px;
    opacity: 0.9;
}

.agent-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.agent-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 0 -8px 12px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.agent-contact:hover {
    background: var(--remax-blue);
    color: var(--bg-white);
    transform: translateX(4px);
}

.agent-contact svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.agent-contact:hover svg {
    transform: scale(1.1);
}

.agent-phone {
    font-weight: 600;
    background: var(--bg-light);
}

.agent-phone:hover {
    background: var(--remax-blue);
}

.agent-email {
    font-size: 14px;
    word-break: break-all;
}

/* Rating del agente en detalle */
.agent-detail-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    margin: 16px 0;
    border-top: 2px solid var(--bg-gray);
    border-bottom: 2px solid var(--bg-gray);
}

.agent-detail-rating .mt-review-stars {
    font-size: 20px;
    gap: 3px;
}

.agent-detail-rating .rating-summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
}

.agent-detail-rating .rating-summary strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.agent-detail-rating .rating-count {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 400;
}

/* Contenedor de acciones en detalle */
.agent-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* WhatsApp Button y Review Button */
.btn-whatsapp,
.btn-review-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 24px;
    color: var(--bg-white);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    border-radius: 12px;
}

.btn-whatsapp {
    background: var(--success-green);
}

.btn-whatsapp:hover {
    background: #008c3d;
    transform: scale(1.02);
}

.btn-review-detail {
    background: var(--remax-blue);
    border: 2px solid var(--remax-blue);
}

.btn-review-detail:hover {
    background: var(--remax-dark);
    border-color: var(--remax-dark);
    transform: scale(1.02);
}

.btn-whatsapp svg,
.btn-review-detail svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ============================================
   Agent Main Content Area
   ============================================ */

.agent-layout .agent-main-content {
    margin-left: 420px;
    min-height: 400px;
}

/* ============================================
   Agent Properties Section
   ============================================ */
.agent-properties-section {
    width: 100%;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--remax-blue);
    border-radius: 2px;
}

.mt-props__summary {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 32px;
}

/* Grid de propiedades */
.agent-properties-section .mt-props__grid,
.additional-properties .mt-props__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* ============================================
   Load More Button
   ============================================ */
.btn-load-more {
    display: block;
    margin: 40px auto 0;
    padding: 16px 40px;
    background: var(--bg-white);
    color: var(--remax-blue);
    border: 2px solid var(--remax-blue);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--remax-blue);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 165, 0.3);
}

/* ============================================
   Additional Properties Section
   ============================================ */
.additional-properties {
    margin-top: 40px;
}

/* Loader */
.loader {
    display: none;
    border: 5px solid var(--bg-light);
    border-top: 5px solid var(--remax-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet Large */
@media screen and (max-width: 1200px) {
    .agent-layout .agent-info-card {
        margin-right: 32px;
    }
}

/* Tablet */
@media screen and (max-width: 1024px) {
    .agent-layout .agent-info-card {
        float: none !important;
        width: 100% !important;
        max-width: 500px;
        margin: 0 auto 32px !important;
        position: relative;
        top: 0;
    }

    .agent-layout .agent-main-content {
        margin-left: 0;
    }

    .agent-photo {
        height: 450px;
    }

    .section-title {
        font-size: 28px;
    }

    .agent-properties-section .mt-props__grid,
    .additional-properties .mt-props__grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .agent-detail-page {
        padding: 24px 0 60px;
    }

    .agent-info-card {
        max-width: 100%;
    }

    .agent-photo {
        height: 380px;
    }

    .agent-name {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .agent-contact {
        font-size: 14px;
        padding: 12px 16px;
    }

    .btn-whatsapp {
        font-size: 15px;
        padding: 16px 20px;
    }

    .agent-properties-section .mt-props__grid,
    .additional-properties .mt-props__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Mobile Small */
@media screen and (max-width: 600px) {
    .agent-detail-page .container {
        padding: 0 16px;
    }

    .agent-photo {
        height: 320px;
    }

    .agent-name {
        font-size: 22px;
    }

    .agent-contact {
        font-size: 13px;
    }

    .section-title {
        font-size: 22px;
    }

    .btn-load-more {
        width: 100%;
        padding: 14px 24px;
    }
}
