/**
 * Single Listing Template - ReviewAsolicitor Three-Column Layout CSS
 * Matches reference site structure with Bootstrap grid
 */

/* CSS Variables */
/* CSS Variables - Elegant Theme */
:root {
    /* Primary Colors */
    --color-green: #059669;
    /* Emerald 600 - More sophisticated */
    --color-green-hover: #047857;
    /* Emerald 700 */
    --color-yellow: #00B567;
    /* Amber 500 */
    --color-pink: #ec4899;
    /* Pink 500 */

    /* Neutral Scale */
    --color-text: #111827;
    /* Gray 900 - Rich Charcoal */
    --color-text-secondary: #4b5563;
    /* Gray 600 */
    --color-text-light: #6b7280;
    /* Gray 500 */
    --color-border: #f3f4f6;
    /* Gray 100 - Very light */
    --color-bg: #f9fafb;
    /* Gray 50 */

    /* Component Specific */
    --color-bg-elevated: #ffffff;

    /* Spacing & Layout */
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 40px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Soft diffused shadow */
    --radius-card: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Global Styles & Typography */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

/* Improved Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
    color: var(--color-text);
    margin-top: 0;
}

h2 {
    font-size: 24px;
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 18px;
    font-weight: 600;
}

/* ===========================
   BREADCRUMBS
   =========================== */
/* ===========================
   BREADCRUMBS
   =========================== */
.listing-breadcrumbs {
    font-size: 14px;
    color: var(--color-text-light);
    padding: 12px 0;
    margin-bottom: var(--space-lg);
}

.listing-breadcrumbs a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.listing-breadcrumbs a:hover {
    color: var(--color-green);
}

.listing-breadcrumbs em {
    margin: 0 10px;
    color: var(--color-border);
    font-style: normal;
}

/* ===========================
   LEFT SIDEBAR
   =========================== */
.listing-sidebar-left {
    background: transparent;
    /* Seamless blend */
}

/* Logo Box */
.listing-logo-box {
    background: #1a203c;
    /* Dark navy matching reference */
    border: none;
    padding: 30px;
    text-align: center;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease;
}

.listing-logo-box:hover {
    transform: translateY(-4px);
}

.listing-logo-box img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Map Box */
.listing-map-box {
    background: #fff;
    border: none;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.listing-map-box img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contact/Address Box */
.listing-contact-box {
    background: transparent;
    border: none;
    padding: 10px 0;
    box-shadow: none;
}

.listing-contact-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #374151;
    /* Gray 700 */
}

.listing-address-content {
    font-size: 18px;
    color: #374151;
    line-height: 1.5;
}

.address-line {
    margin-bottom: 2px;
}

/* Contact Action Rows */
.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: none;
    text-decoration: none !important;
}

.contact-row i {
    width: auto;
    height: auto;
    background: transparent;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-size: 18px;
    box-shadow: none;
    transition: none;
}

.contact-row a {
    color: #374151;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 18px;
}

.website-row a {
    color: var(--rs-green) !important;
    /* Specific green from reference */
    font-weight: 500;
}

.contact-row:hover i,
.contact-row:hover a {
    color: var(--color-green);
}

/* ===========================
   MAIN CONTENT
   =========================== */
/* ===========================
   MAIN CONTENT
   =========================== */
.listing-main-content {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Header with Title and Phone */
.listing-header {
    background: var(--color-bg-elevated);
    padding: var(--space-xl) var(--space-xl) 24px;
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.listing-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 16px 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.listing-phone-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-green);
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    background: #ecfdf5;
    /* Light emerald bg */
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.2s;
}

.listing-phone-large:hover {
    background: var(--color-green);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.listing-phone-large i {
    font-size: 18px;
}

/* Description */
.listing-description {
    background: var(--color-bg-elevated);
    border: none;
    padding: var(--space-xl);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 0;
}

.listing-description p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-size: 16px;
}

/* Branch Photos Carousel */
/* Branch Photos Carousel */
.listing-branch-photos {
    background: var(--color-bg-elevated);
    border: none;
    padding: 24px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.branch-photos-carousel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: none;
    /* JS toggles this */
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--color-green);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--color-green);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-indicator.active {
    background: var(--color-green);
    transform: scale(1.2);
}

/* Lawyer Profile Section */
.listing-lawyer-profile {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.listing-lawyer-profile::before {
    background: linear-gradient(90deg, var(--color-green) 0%, #34d399 100%);
    height: 6px;
}

.lawyer-avatar {
    width: 100px;
    height: 100px;
    border: 4px solid #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.lawyer-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.lawyer-title {
    font-size: 14px;
    color: var(--color-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.btn-view-profile {
    background: var(--color-text);
    /* Black button */
    color: #fff;
    border-radius: 30px;
    padding: 12px 28px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-view-profile:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Accreditations */
.listing-accreditations {
    background: var(--color-bg-elevated);
    border: none;
    box-shadow: var(--shadow-card);
    padding: 40px;
    border-radius: var(--radius-card);
    margin-bottom: 0;
}

/* Rankings */
.listing-rankings {
    background: var(--color-bg-elevated);
    border: none;
    padding: 40px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.listing-rankings h2,
.listing-review-sources h2 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: left;
    /* Better left align */
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 15px;
}

.rankings-subtitle {
    text-align: left;
    max-width: 600px;
}

.rankings-tabs {
    justify-content: flex-start;
}

.ranking-tab {
    background: #f3f4f6;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    color: var(--color-text-secondary);
}

.ranking-tab.active {
    background: var(--color-text);
    color: #fff;
    border-color: transparent;
}

/* Full Width Content Styling */
.listing-full-width-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Review Sources Section */
.listing-review-sources {
    background: var(--color-bg-elevated);
    border: none;
    padding: 0;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 40px;
}

.review-sources-header {
    text-align: center;
    padding: 50px 40px 30px;
}

.listing-review-sources h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 40px;
    border: none;
    padding: 0;
}

/* Source Logos */
.source-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.source-logo {
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
}

.source-logo.active,
.source-logo:hover {
    opacity: 1;
    filter: none;
    transform: translateY(-2px);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--rs-green);
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    margin-right: 8px;
}

.text-green {
    color: var(--rs-green);
}

.g-blue {
    color: #4285F4;
}

.g-red {
    color: #EA4335;
}

.g-yellow {
    color: #FBBC05;
}

.g-green {
    color: #34A853;
}

.logo-text-fb {
    color: #1877F2;
    letter-spacing: 1px;
    font-size: 20px;
}

.logo-text-tp {
    color: var(--rs-green);
    font-family: sans-serif;
}

/* Grid Layout */
.review-sources-grid {
    display: grid;
    grid-template-columns: 280px 1fr 1fr;
    gap: 60px;
    align-items: start;
    padding: 0 60px 60px;
}

/* Col 1: Summary Card */
.review-card-left {
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.review-count-large {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 8px;
}

.review-label-large {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.review-score-large {
    font-size: 64px;
    font-weight: 700;
    color: var(--color-green);
    line-height: 1;
    margin-bottom: 10px;
}

.score-total {
    font-size: 24px;
    color: var(--color-green);
    opacity: 0.7;
    margin-left: 2px;
}

.review-stars-large {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.review-stars-large i {
    font-size: 24px;
    color: #00B567;
}

/* Col 2: Detailed Criteria */
.review-criteria-middle {
    padding-top: 15px;
    min-width: 300px;
}

.criteria-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 10px;
}

.criteria-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.criteria-stars {
    color: #00B567;
    font-size: 16px;
    display: flex;
    gap: 2px;
}

/* Col 3: Breakdown Bars */
.review-breakdown-right h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 25px;
    margin-top: 0;
}

.breakdown-bar {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    gap: 20px;
    align-items: center;
    margin-bottom: 10px;
}

.bar-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.bar-track {
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #00B567;
    border-radius: 5px;
}

.bar-count {
    font-weight: 700;
    color: var(--color-text);
    font-size: 14px;
    text-align: right;
}

/* About Section Full Width */
.listing-about {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    border: 1px solid #eee !important;
    margin-bottom: 40px !important;
}

.about-branch-header {
    background: transparent !important;
    padding: 30px 30px 10px 30px !important;
    border: none !important;
    margin: 0 !important;
}

.about-section-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--rs-green) !important;
    margin: 0 !important;
    text-align: left !important;
    background: transparent !important;
}

.about-content {
    padding: 0 30px 30px 30px !important;
    background: #fff !important;
}

.about-row {
    display: grid !important;
    grid-template-columns: 180px 1fr !important;
    border-top: 1px solid #f0f0f0 !important;
    padding: 25px 0 !important;
    align-items: start !important;
}

.about-row:first-child {
    border-top: none !important;
}

.about-label {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin: 0 !important;
}

.about-value {
    color: #555 !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
}

.about-description-text {
    color: #555 !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
}

.about-description-text p {
    margin-bottom: 12px !important;
}

.about-description-text p:last-child {
    margin-bottom: 0 !important;
}

.badge-regulated {
    background: #c61d23 !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    text-transform: none !important;
}

.practice-areas-heading {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 0 15px 0 !important;
}

.practice-area-item {
    padding: 3px 0 !important;
    color: var(--rs-green) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    list-style: none !important;
}

.practice-areas-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.practice-areas-cta {
    margin-top: 25px !important;
    text-align: left !important;
}

.btn-book-appointment {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 24px !important;
    background: var(--rs-green) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-book-appointment:hover {
    background: #008f45 !important;
    color: #fff !important;
}

.btn-book-appointment i {
    color: #fff !important;
}

/* Lawyer Profile Centered */
.listing-lawyer-profile {
    display: flex;
    align-items: center;
    gap: 32px;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.lawyer-avatar {
    width: 120px;
    height: 120px;
}

.lawyer-name {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Remove Sidebar Logo Repeat */
.listing-logo-repeat {
    display: none !important;
}

/* Sidebar Rating Display */
.sidebar-rating-display {
    margin-bottom: 24px;
    background: var(--color-bg-elevated);
    padding: 24px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.sidebar-rating-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.sidebar-rating-number {
    line-height: 1;
}

.rating-value-sidebar {
    font-size: 56px;
    font-weight: 800;
    color: var(--color-green);
    line-height: 1;
}

.rating-max-sidebar {
    font-size: 18px;
    color: var(--color-text-secondary);
    font-weight: 600;
    display: block;
    margin-top: 4px;
}

.sidebar-rating-stars-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sidebar-rating-stars {
    display: flex;
    gap: 4px;
    color: var(--color-yellow);
    font-size: 18px;
    margin-bottom: 8px;
}

.sidebar-rating-stars .fas {
    color: var(--color-yellow);
}

.sidebar-rating-stars .far {
    color: #d1d5db;
}

.sidebar-rating-count {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 600;
}

/* Leave Review Button */
.btn-leave-review {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--color-yellow) 0%, #d97706 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 16px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-leave-review i {
    color: #fff !important;
}

.btn-leave-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(245, 158, 11, 0.4);
    color: #fff !important;
    text-decoration: none !important;
}

/* CTA Buttons */
.listing-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.listing-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--color-green);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: var(--radius-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.listing-cta-btn i {
    color: #fff !important;
    font-size: 18px;
    transition: transform 0.2s;
}

.listing-cta-btn span {
    color: #fff !important;
}

.listing-cta-btn:hover {
    background: var(--color-green-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.3);
    color: #fff !important;
    text-decoration: none !important;
}

.listing-cta-btn:hover i {
    transform: scale(1.1);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
/* --- Tablet (991px) --- */
@media (max-width: 991px) {
    .listing-sidebar-right {
        position: static;
    }

    .review-sources-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 30px 40px;
    }

    .review-card-left {
        max-width: 320px;
        margin: 0 auto;
    }

    .about-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* --- Mobile (767px) --- */
@media (max-width: 767px) {
    .listing-lawyer-profile {
        flex-direction: column;
        text-align: center;
    }

    .review-count-number {
        font-size: 60px;
    }

    .review-sources-grid {
        padding: 0 16px 30px;
        gap: 24px;
    }

    .listing-sidebar-right {
        margin-top: 20px;
    }

    .listing-info-row {
        flex-direction: column;
        gap: 8px;
    }

    .listing-contact-item {
        font-size: 13px;
    }

    .listing-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .listing-tabs::-webkit-scrollbar {
        display: none;
    }
    .listing-tab {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 13px;
        padding: 10px 14px;
    }

    .listing-card,
    .listing-review-card {
        padding: 16px;
    }

    .listing-review-header {
        flex-wrap: wrap;
    }

    .listing-review-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* --- Small Mobile (480px) --- */
@media (max-width: 480px) {
    .listing-lawyer-profile-photo {
        width: 80px;
        height: 80px;
    }

    .listing-lawyer-name {
        font-size: 20px;
    }

    .review-count-number {
        font-size: 48px;
    }

    .listing-card {
        padding: 12px;
    }

    .about-row {
        gap: 10px;
    }

    .listing-tab {
        font-size: 12px;
        padding: 8px 10px;
    }

    .listing-section-heading {
        font-size: 17px;
    }
}