:root {
    /* Base Colors - Light Mode */
    --profile-bg: #F8F9FA; /* Light grey background */
    --profile-card-bg: #FFFFFF;
    --profile-text-primary: #212529;
    --profile-text-secondary: #6C757D;
    --profile-border-color: #E9ECEF;
    --profile-hero-overlay: rgba(0, 0, 0, 0.1); /* Subtle overlay on hero image */

    /* Accent Colors - Default to FPA Blue, JS will override */
    --profile-accent: #4361ee; /* Advocate's chosen primary color */
    --profile-accent-light: #eff6ff; /* Lighter shade for hover, backgrounds */
    --profile-accent-dark: #3730a3;  /* Darker shade for active states */
    --profile-text-on-accent: #FFFFFF;

    /* Spacing & Radius */
    --profile-spacing-xs: 0.25rem;  /* 4px */
    --profile-spacing-sm: 0.5rem;   /* 8px */
    --profile-spacing-md: 1rem;     /* 16px */
    --profile-spacing-lg: 1.5rem;   /* 24px */
    --profile-spacing-xl: 2rem;     /* 32px */
    --profile-radius-sm: 6px;
    --profile-radius-md: 12px;
    --profile-radius-lg: 20px;
    --profile-radius-full: 999px;

    /* Shadows */
    --profile-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --profile-shadow-md: 0 5px 15px rgba(0,0,0,0.08);

    /* Typography - JS can override --profile-font-family */
    --profile-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dark {
    /* Base Colors - Dark Mode (dynamically generated from accent color) */
    --profile-bg: var(--profile-dark-bg, #0a0e1a); /* Fallback navy */
    --profile-card-bg: var(--profile-dark-card-bg, #0f1419); /* Fallback navy card */
    --profile-text-primary: var(--profile-dark-text-primary, #E8E9EA);
    --profile-text-secondary: var(--profile-dark-text-secondary, #B0B3B8);
    --profile-border-color: var(--profile-dark-border-color, #1a1f2e); /* Fallback navy border */
    --profile-hero-overlay: rgba(0, 0, 0, 0.3);

    /* Accent Colors in Dark Mode - use dynamically generated versions */
    --profile-accent-light: var(--profile-dark-accent-light, rgba(var(--profile-accent-rgb, 67, 97, 238), 0.2));
    --profile-accent-dark: var(--profile-dark-accent-dark, var(--profile-accent)); 
}

/* General dark mode body background for all screen sizes */
.dark body {
    background-color: var(--profile-dark-bg, #0a0e1a); /* Use dynamically generated dark background */
}

/* Base & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--profile-font-family);
    background-color: var(--profile-bg);
    color: var(--profile-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--profile-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.loading-overlay:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--profile-border-color);
    border-top-color: var(--profile-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--profile-spacing-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.brand-dots {
    display: flex;
    gap: 8px;
    margin-bottom: var(--profile-spacing-md);
    align-items: end;
    height: 24px;
}

.dot {
    width: 1rem;
    height: 1rem;
    background-color: var(--color);
    border-radius: 50%;
    animation: dotBounce 1.2s ease-in-out infinite var(--delay);
}

@keyframes dotBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-12px);
    }
}

.loading-text {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--profile-text-secondary);
    margin-top: var(--profile-spacing-xs);
}

/* Main Profile Container */
.profile-container {
    max-width: 700px; /* Max width for content, hero image can be wider if desired */
    margin: 0 auto;
    background-color: var(--profile-bg);
    padding-bottom: 100px; /* Space for fixed CTA bar */
}

/* Desktop-specific layout adjustments */
@media (min-width: 992px) {
    body {
        /* Use a very light version of the accent color for the background */
        background-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.05);
    }
    
    /* Dark mode override for desktop background */
    .dark body {
        background-color: var(--profile-dark-desktop-bg, #0a0e1a); /* Use dynamically generated dark desktop background */
    }
    
    .profile-container {
        max-width: 800px; /* Slightly wider on desktop */
        margin-top: 40px;
        margin-bottom: 40px;
        box-shadow: var(--profile-shadow-md); /* Add shadow for depth */
        border-radius: var(--profile-radius-lg); /* Rounded corners for the entire container */
        overflow: hidden; /* Ensure content respects border radius */
    }
    
    /* Replace hero image with banner for desktop */
    .profile-hero {
        height: 180px; /* Shorter height for banner style */
        background-color: var(--profile-accent); /* Use accent color as background */
    }
    
    /* Hide the hero image on desktop */
    .hero-image {
        display: none;
    }
    
    /* Profile content layout for desktop */
    .profile-content-card {
        display: flex; /* Use flexbox for layout */
        padding: 30px;
    }
    
    /* Profile image container */
    .profile-image-container {
        display: block; /* Create this container with JS */
        width: 120px;
        height: 120px;
        margin-right: 30px;
        border-radius: 50%;
        border: 4px solid var(--profile-card-bg);
        box-shadow: var(--profile-shadow-sm);
        overflow: hidden;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .profile-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }
    
    /* Content area */
    .profile-content-main {
        flex-grow: 1;
    }
    
    .advocate-info-header {
        margin-top: 0;
    }
    
    .advocate-stats {
        margin-top: 10px;
    }
}

/* Profile Header */
.profile-header {
    position: fixed; /* Changed to fixed */
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--profile-spacing-md) var(--profile-spacing-md);
    background-color: transparent; /* Make it transparent initially */
    z-index: 100;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.profile-header.scrolled {
    background-color: var(--profile-card-bg); /* Solid background on scroll */
    box-shadow: var(--profile-shadow-sm);
    padding: 0.5rem var(--profile-spacing-md); /* Slightly less padding when scrolled */
}

/* Header brand styling */
.header-brand {
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
}

.profile-header.scrolled .header-brand {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Mobile header brand with profile photo */
@media (max-width: 640px) {
    .header-brand {
        gap: 8px;
    }
    
    .header-brand-photo {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        object-position: center top;
        border: 2px solid var(--profile-card-bg);
        box-shadow: var(--profile-shadow-sm);
    }
    
    .header-brand-name {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--profile-text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
        display: block;
    }
    
    .header-brand .header-logo,
    .header-brand .header-brand-text {
        display: none;
    }
}

/* Desktop header brand with logo */
@media (min-width: 641px) {
    .header-brand-photo,
    .header-brand-name {
        display: none;
    }
    
    .header-logo {
        height: 40px;
        width: auto;
        margin-right: 8px;
    }
    
    .header-brand-text {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--profile-text-primary);
        white-space: nowrap;
    }
}

.header-logo {
    height: 40px;
    width: auto;
    margin-right: 8px;
}

.header-brand-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--profile-text-primary);
    white-space: nowrap;
}

/* Hide brand text on smaller screens, just show logo */
@media (max-width: 640px) {
    .header-brand-text {
        display: none;
    }
    
    .header-logo {
        margin-right: 0;
    }
}

.header-btn {
    background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
    color: white;
    border-radius: var(--profile-radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.header-btn:hover {
    background-color: rgba(0,0,0,0.5);
}

.profile-header.scrolled .header-btn {
    background-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.1); /* Light, semi-transparent accent */
    color: var(--profile-accent);
}

.profile-header.scrolled .header-btn:hover {
    background-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.2); /* Slightly darker on hover */
    color: var(--profile-accent-dark);
}

.header-btn i {
    width: 22px;
    height: 22px;
}

/* Phone button styling */
.phone-btn {
    margin-left: 8px; /* Space between buttons */
    width: 44px; /* Match message-btn width */
    height: 44px; /* Match message-btn height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-btn i {
    width: 22px;
    height: 22px;
}

/* When both buttons are present, adjust spacing */
.message-btn + .phone-btn {
    margin-left: 8px;
}

/* Hero Section */
.profile-hero {
    width: 100%;
    height: 60vh; /* Adjust height as needed, e.g., 300px or 40vh */
    max-height: 450px;
    position: relative;
    overflow: hidden;
    background-color: var(--profile-border-color); /* Placeholder bg */
}

/* Mobile Hero Image */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Main Content Card */
.profile-content-card {
    background-color: var(--profile-card-bg);
    padding: var(--profile-spacing-lg);
    margin: -50px var(--profile-spacing-md) var(--profile-spacing-md);
    border-radius: var(--profile-radius-lg);
    box-shadow: var(--profile-shadow-md);
    position: relative;
    z-index: 10;
}

.advocate-info-header {
    display: flex;
    align-items: flex-start; /* Align items to top */
    margin-bottom: var(--profile-spacing-md);
}

.advocate-info-header h2 {
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    color: var(--profile-text-primary);
    margin-right: auto; /* Push message button to the right */
    line-height: 1.2;
}

.advocate-info-header .tagline {
    font-size: 0.9375rem; /* 15px */
    color: var(--profile-text-secondary);
    margin-top: 4px; /* Align with bottom of h2 if multiline */
    display: block; /* Ensure it's on its own line or wraps well */
}

.advocate-info-header .message-btn {
    background-color: var(--profile-accent);
    color: var(--profile-text-on-accent);
    width: 44px; /* Slightly larger */
    height: 44px;
    margin-left: var(--profile-spacing-sm);
    flex-shrink: 0; /* Prevent shrinking */
}

.advocate-info-header .message-btn:hover {
    background-color: var(--profile-accent-dark);
}

.advocate-stats {
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-sm);
    margin-bottom: var(--profile-spacing-md);
    padding-bottom: var(--profile-spacing-md);
    border-bottom: 1px solid var(--profile-border-color);
    flex-wrap: wrap; /* Allow stats to wrap on smaller screens if needed */
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-xs);
    font-size: 0.875rem; /* 14px */
    color: var(--profile-text-secondary);
}

.stat-item > svg {
    width: 1rem;
    height: 1rem;
    color: var(--profile-accent); /* Use accent for stat icons */
}

.stat-divider {
    width: 1px;
    height: 16px;
    background-color: var(--profile-border-color);
}

.advocate-bio {
    margin-bottom: var(--profile-spacing-md);
}

.advocate-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--profile-spacing-sm);
    margin: var(--profile-spacing-sm) 0;
}

.advocate-info-list .info-item {
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-sm);
    color: var(--profile-text-secondary);
    font-size: 0.875rem;
}

.advocate-info-list .info-item > svg {
    width: 1rem;
    height: 1rem;
    color: var(--profile-accent);
}

.advocate-info-list .info-item:hover {
    color: var(--profile-text-primary);
}

.advocate-info-list .info-item[style*="cursor: pointer"]:hover {
    color: var(--profile-accent);
}

/* Additional Sections */
.profile-additional-sections {
    padding: 0 var(--profile-spacing-md) var(--profile-spacing-md);
}

.profile-details-section {
    margin-bottom: var(--profile-spacing-lg);
    background-color: var(--profile-card-bg);
    padding: var(--profile-spacing-md);
    border-radius: var(--profile-radius-md);
    box-shadow: var(--profile-shadow-sm);
}

.profile-details-section h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    color: var(--profile-text-primary);
    margin-bottom: var(--profile-spacing-sm);
    padding-bottom: var(--profile-spacing-sm);
    border-bottom: 1px solid var(--profile-border-color);
}

.profile-details-section h4 {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    color: var(--profile-text-primary);
    margin-top: var(--profile-spacing-md);
    margin-bottom: var(--profile-spacing-xs);
}

.content-well {
    font-size: 0.9375rem;
    color: var(--profile-text-secondary);
    padding: var(--profile-spacing-sm) 0;
}

.stacked-list {
    list-style: none;
    padding-left: 0;
}

.stacked-list li {
    padding: var(--profile-spacing-xs) 0;
    border-bottom: 1px dashed var(--profile-border-color);
}
.stacked-list li:last-child {
    border-bottom: none;
}

/* Specialties Section */
.specialties-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--profile-spacing-sm);
    padding: var(--profile-spacing-xs) 0; /* Reduced padding for tighter look */
}

.specialty-pill {
    background-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.2); /* 20% opacity */
    color: var(--profile-text-primary);
    padding: var(--profile-spacing-xs) var(--profile-spacing-md);
    border-radius: var(--profile-radius-full); /* Fully rounded pills */
    font-size: 0.8rem; /* Smaller font size for pills */
    font-weight: 500;
}

/* FAQ Specific Styling */
#faqListContainer .faq-item {
    border-bottom: 1px solid var(--profile-border-color);
    overflow: hidden;
}

#faqListContainer .faq-item:last-child {
    border-bottom: none;
}

#faqListContainer .faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: var(--profile-spacing-md) 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

#faqListContainer .faq-question:hover {
    color: var(--profile-accent);
}

#faqListContainer .faq-question-text {
    font-weight: 600;
    color: var(--profile-text-primary);
    flex-grow: 1;
    margin-right: var(--profile-spacing-sm);
    line-height: 1.4;
}

#faqListContainer .faq-question:hover .faq-question-text {
    color: var(--profile-accent);
}

#faqListContainer .faq-chevron {
    width: 20px;
    height: 20px;
    color: var(--profile-text-secondary);
    transition: transform 0.3s ease, color 0.2s ease;
    flex-shrink: 0;
}

#faqListContainer .faq-question:hover .faq-chevron {
    color: var(--profile-accent);
}

#faqListContainer .faq-question[aria-expanded="true"] .faq-chevron {
    transform: rotate(180deg);
}

#faqListContainer .faq-answer-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}

#faqListContainer .faq-question[aria-expanded="true"] + .faq-answer-wrapper {
    padding-bottom: var(--profile-spacing-md);
}

#faqListContainer .faq-answer {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--profile-text-secondary);
    padding-left: var(--profile-spacing-sm);
    padding-right: var(--profile-spacing-lg); /* Space for chevron */
    padding-top: var(--profile-spacing-xs);
}

/* Testimonial Specific Styling */
#testimonialListContainer .testimonial-item {
    margin-bottom: var(--profile-spacing-md);
    padding-bottom: var(--profile-spacing-md);
    border-bottom: 1px dashed var(--profile-border-color);
}
#testimonialListContainer .testimonial-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
#testimonialListContainer .testimonial-text {
    margin-bottom: var(--profile-spacing-xs);
}

/* Rich text content within testimonials */
#testimonialListContainer .testimonial-text p {
    margin-bottom: var(--profile-spacing-sm);
    line-height: 1.6;
}

#testimonialListContainer .testimonial-text p:last-child {
    margin-bottom: 0;
}

#testimonialListContainer .testimonial-text strong {
    font-weight: 600;
    color: var(--profile-text-primary);
}

#testimonialListContainer .testimonial-text em {
    font-style: italic;
}

#testimonialListContainer .testimonial-text ul,
#testimonialListContainer .testimonial-text ol {
    margin-bottom: var(--profile-spacing-sm);
    padding-left: 1.5rem;
}

#testimonialListContainer .testimonial-text li {
    margin-bottom: var(--profile-spacing-xs);
    line-height: 1.5;
}

#testimonialListContainer .testimonial-author {
    text-align: right;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--profile-text-primary);
}
#testimonialListContainer .testimonial-author::before {
    content: "— ";
}

/* Reviews Specific Styling */
#reviewsList .review-item {
    margin-bottom: var(--profile-spacing-md);
    padding-bottom: var(--profile-spacing-md);
    border-bottom: 1px dashed var(--profile-border-color);
}
#reviewsList .review-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--profile-spacing-xs);
}

.review-date {
    font-size: 0.75rem;
    color: var(--profile-text-secondary);
    font-weight: 500;
    white-space: nowrap;
    margin-left: var(--profile-spacing-sm);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-xs);
}

.star-display {
    display: flex;
    gap: 2px;
}

.star-display .star {
    width: 16px;
    height: 16px;
    color: #fbbf24; /* Golden yellow for stars */
}

.star-display .star.filled {
    fill: currentColor;
}

.star-display .star.empty {
    fill: currentColor;
    stroke: #fbbf24;
    stroke-width: 1.5;
    opacity: 0.3; /* Make empty stars more subtle */
}

.verified-badge {
    background-color: var(--profile-accent);
    color: var(--profile-text-on-accent);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--profile-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.verified-badge > svg {
    width: 12px;
    height: 12px;
}

.review-text {
    margin-bottom: var(--profile-spacing-xs);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.review-author {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--profile-text-secondary);
    text-align: right;
}

.review-author::before {
    content: "— ";
}

/* Review Form Styling */
.review-form-container {
    margin-top: var(--profile-spacing-lg);
    padding-top: var(--profile-spacing-md);
    border-top: 1px dashed var(--profile-border-color);
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: var(--profile-spacing-xl) var(--profile-spacing-md);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    color: var(--profile-text-secondary);
    margin: 0 auto var(--profile-spacing-md);
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--profile-text-primary);
    margin-bottom: var(--profile-spacing-sm);
}

.empty-state-text {
    font-size: 0.9375rem;
    color: var(--profile-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Required field asterisk styling */
.required-asterisk {
    color: var(--profile-accent);
    font-weight: 700;
    margin-left: 2px;
}

/* Conditional required asterisks (for verification fields) */
.required-asterisk.conditional-required {
    opacity: 1;
}

.btn-write-review {
    background-color: var(--profile-accent);
    color: var(--profile-text-on-accent);
    border: none;
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    border-radius: var(--profile-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--profile-spacing-xs);
    transition: background-color 0.2s ease;
}

.btn-write-review:hover {
    background-color: var(--profile-accent-dark);
}

.btn-write-review > svg {
    width: 16px;
    height: 16px;
}

.review-form {
    margin-top: var(--profile-spacing-md);
    background-color: var(--profile-card-bg);
    border: 1px solid var(--profile-border-color);
    border-radius: var(--profile-radius-md);
    padding: var(--profile-spacing-lg);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-form h4 {
    margin-bottom: var(--profile-spacing-md);
    color: var(--profile-text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.review-form .form-group {
    margin-bottom: var(--profile-spacing-md);
}

.review-form .form-group:last-of-type {
    margin-bottom: var(--profile-spacing-lg);
}

.review-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--profile-text-primary);
    margin-bottom: var(--profile-spacing-xs);
}

.review-form input[type="text"],
.review-form input[type="email"],
.review-form textarea {
    width: 100%;
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    border: 1px solid var(--profile-border-color);
    border-radius: var(--profile-radius-sm);
    background-color: var(--profile-card-bg);
    color: var(--profile-text-primary);
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-form input[type="text"]:focus,
.review-form input[type="email"]:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--profile-accent);
    box-shadow: 0 0 0 2px rgba(var(--profile-accent-rgb, 67, 97, 238), 0.2);
}

.review-form textarea {
    min-height: 80px;
    resize: vertical;
}

.review-form .char-counter {
    font-size: 0.75rem;
    color: var(--profile-text-secondary);
    text-align: right;
    margin-top: var(--profile-spacing-xs);
    display: block;
}

/* Verification Section Styles */
.verification-opt-in {
    background-color: var(--profile-bg);
    border: 1px solid var(--profile-border-color);
    border-radius: var(--profile-radius-sm);
    padding: var(--profile-spacing-md);
    margin-bottom: var(--profile-spacing-md) !important;
}

.verification-checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    margin-bottom: var(--profile-spacing-xs) !important;
    font-weight: 500 !important;
}

.verification-checkbox-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: var(--profile-spacing-sm);
    accent-color: var(--profile-accent);
    cursor: pointer;
}

.verification-checkbox-text {
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-xs);
    color: var(--profile-text-primary);
    font-size: 0.875rem;
}

.verification-checkbox-text > svg {
    width: 16px;
    height: 16px;
    color: var(--profile-accent);
}

.verification-section {
    background-color: transparent; /* Remove background since it's now inside the opt-in card */
    border: none; /* Remove border since it's contained within the opt-in card */
    border-radius: 0; /* Remove border radius */
    padding: var(--profile-spacing-md) 0 0 0; /* Only top padding, remove sides since it's nested */
    margin-bottom: var(--profile-spacing-md);
    animation: slideDown 0.3s ease-out;
}

.verification-info {
    margin-bottom: var(--profile-spacing-md);
}

.info-box {
    display: flex;
    gap: var(--profile-spacing-sm);
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    background-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.1);
    border: 1px solid rgba(var(--profile-accent-rgb, 67, 97, 238), 0.2);
    border-radius: var(--profile-radius-sm);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.info-box > svg {
    width: 16px;
    height: 16px;
    color: var(--profile-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    color: var(--profile-text-primary);
}

.info-box strong {
    color: var(--profile-text-primary);
}

.verification-services {
    margin-bottom: 0 !important;
}

.verification-services .verification-checkbox-label {
    margin-bottom: 0 !important;
}

/* Dark mode adjustments for verification */
.dark .verification-opt-in {
    background-color: var(--profile-card-bg);
    border-color: var(--profile-border-color);
}

.dark .info-box {
    background-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.15);
    border-color: rgba(var(--profile-accent-rgb, 67, 97, 238), 0.3);
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    gap: 4px;
    margin-top: var(--profile-spacing-xs);
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.15s ease;
}

.star-btn:hover {
    transform: scale(1.1);
}

.star-btn > svg {
    width: 20px;
    height: 20px;
    color: var(--profile-text-secondary); /* Use secondary text color for unselected */
    transition: color 0.15s ease;
}

.star-btn.selected > svg,
.star-btn.hover i {
    color: #fbbf24; /* Keep golden yellow for stars - this is a universal star color */
    fill: currentColor;
}

/* Review Form Actions */
.review-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--profile-spacing-sm);
}

.review-form-actions .btn-secondary {
    color: var(--profile-text-secondary);
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}


.review-form-actions .btn-primary {
    background-color: var(--profile-accent);
    color: var(--profile-text-on-accent);
    border: none;
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    border-radius: var(--profile-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--profile-spacing-xs);
    transition: background-color 0.2s ease;
}

.review-form-actions .btn-primary:hover {
    background-color: var(--profile-accent-dark);
}

.review-form-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.review-form-actions .btn-primary > svg {
    width: 16px;
    height: 16px;
}

/* Section divider between reviews and testimonials */
.testimonials-divider {
    margin: var(--profile-spacing-lg) 0 var(--profile-spacing-md);
    text-align: center;
    position: relative;
}

.testimonials-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--profile-border-color);
    z-index: 1;
}

.testimonials-divider span {
    background-color: var(--profile-card-bg);
    color: var(--profile-text-secondary);
    padding: 0 var(--profile-spacing-md);
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .review-header {
        flex-direction: row; /* Keep it as row to maintain same line */
        align-items: center; /* Center align items vertically */
        gap: var(--profile-spacing-xs);
    }
    
    .review-date {
        margin-left: var(--profile-spacing-xs);
        font-size: 0.6875rem; /* Slightly smaller on mobile */
    }
    
    .review-form {
        padding: var(--profile-spacing-md);
    }
    
    .review-form-actions {
        flex-direction: row;
    }
    
    .review-form-actions .btn-primary,
    .review-form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .review-form-actions .btn-primary {
        height: 3rem;
    }

    #faqListContainer .faq-question {
        padding: var(--profile-spacing-sm) 0;
        font-size: 0.875rem;
    }
    
    #faqListContainer .faq-answer {
        padding-right: var(--profile-spacing-md);
        font-size: 0.8125rem;
    }
}

/* Animation for loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Availability Section */
.availability-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center the items horizontally */
    gap: var(--profile-spacing-sm);
    padding: var(--profile-spacing-sm) 0;
}

.availability-day {
    background-color: var(--profile-bg); /* Use profile bg for non-selected days */
    border: 1px solid var(--profile-border-color);
    border-radius: var(--profile-radius-md);
    padding: var(--profile-spacing-xs) var(--profile-spacing-sm);
    text-align: center;
    width: 85px; /* Fixed width for consistency */
    flex: 0 0 auto; /* Don't grow or shrink */
}

.availability-day.available {
    background-color: var(--profile-accent-light);
    border-color: var(--profile-accent);
}

.availability-day .day-name {
    font-size: 0.75rem; /* 12px */
    color: var(--profile-text-secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.availability-day.available .day-name {
    color: var(--profile-text-primary);
}

.availability-day .date-number {
    font-size: 1.25rem; /* Slightly smaller for better fit */
    font-weight: 600;
    display: block;
    line-height: 1.2;
}

.availability-day .hours {
    font-size: 0.6875rem; /* 11px - even smaller for hours */
    color: var(--profile-text-secondary);
    display: block;
    margin-top: 2px;
}

.availability-day.available .date-number,
.availability-day.available .hours {
    color: var(--profile-text-primary);
}

/* Dark mode improvements for availability days */
.dark .availability-day.available {
    background-color: var(--profile-accent-dark);
    border-color: var(--profile-accent);
}

.dark .availability-day.available .day-name,
.dark .availability-day.available .date-number,
.dark .availability-day.available .hours {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Fixed Bottom CTA Bar */
.profile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--profile-card-bg);
    padding: var(--profile-spacing-sm) var(--profile-spacing-md); /* Adjusted padding for smaller bar */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Changed to space-between */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 50;
    border-top: 1px solid var(--profile-border-color);
    min-height: 70px; /* Ensure a minimum height */
}

.profile-cta-bar .price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Reduced padding/margins */
    margin-right: 10px;
    padding: 8px 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--profile-text-primary);
}

.profile-cta-bar .price-label {
    font-size: 0.75rem; /* 12px */
    color: var(--profile-text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px; /* Small space between label and value */
}

.profile-cta-bar .price-value {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    color: var(--profile-text-primary);
}

.cta-button {
    background-color: var(--profile-accent);
    color: var(--profile-text-on-accent);
    padding: var(--profile-spacing-md) var(--profile-spacing-lg);
    border-radius: var(--profile-radius-full);
    font-size: 1rem; /* 16px */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-sm);
    transition: background-color 0.2s ease;
    justify-content: center;
    min-width: 180px; /* Give button a minimum width */
}

.cta-button:hover {
    background-color: var(--profile-accent-dark);
}

.cta-button i {
    width: 18px;
    height: 18px;
}

/* Tablet and Desktop Adjustments */
@media (min-width: 768px) {
    .profile-container {
        padding-bottom: 0; /* No need for cta bar padding if content scrolls */
    }
    .profile-hero {
        height: 350px; /* Fixed height for hero on larger screens */
    }
    .profile-content-card {
        margin: -80px var(--profile-spacing-lg) var(--profile-spacing-lg);
        padding: var(--profile-spacing-xl);
    }
    .advocate-info-header h2 {
        font-size: 2rem; /* 32px */
    }
    .profile-additional-sections {
        padding: 0 var(--profile-spacing-lg) var(--profile-spacing-lg);
    }
    .profile-cta-bar {
        position: relative; /* No longer fixed on desktop */
        box-shadow: none;
        border-top: none;
        margin: 0 var(--profile-spacing-lg) var(--profile-spacing-lg);
        background-color: var(--profile-card-bg);
        border-radius: var(--profile-radius-md);
        border: 1px solid var(--profile-border-color);
        box-shadow: var(--profile-shadow-sm);
    }
    .cta-button {
        flex-grow: 0; /* Don't grow on desktop if price info is shown */
        min-width: 200px;
    }
    /* Create floating rate box on desktop */
    .profile-cta-bar .price-info {
        background-color: var(--profile-card-bg); /* Change back to card background */
        margin-right: 15px;
        /* Remove border and shadow, just keep tighter spacing */
    }
}

/* New Footer Styles */
.profile-footer {
    background-color: var(--profile-card-bg);
    border-top: 1px solid var(--profile-border-color);
    padding: 1rem 0;
    width: 100%;
    font-size: 0.875rem;
}

.profile-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.profile-footer-copyright {
    color: var(--profile-text-secondary);
}

.profile-footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--profile-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--profile-accent);
}

.profile-footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--profile-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-link:hover {
    color: var(--profile-accent);
    background-color: var(--profile-accent-light);
}

.social-link > svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (max-width: 600px) {
    .profile-footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .profile-footer-copyright {
        order: 3;
        font-size: 0.75rem;
        opacity: 0.8;
    }
}

/* Header right buttons container */
.header-right-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Floating CTA Button */
.floating-cta-btn {
    background-color: var(--profile-accent);
    color: var(--profile-text-on-accent);
    border: none;
    border-radius: var(--profile-radius-full);
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: none; /* Hidden on mobile */
}

.floating-cta-btn:hover {
    background-color: var(--profile-accent-dark);
    transform: translateY(0) scale(1.02);
}

.profile-header.scrolled .floating-cta-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-cta-btn.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
}

/* Desktop only for floating CTA */
@media (min-width: 992px) {
    .floating-cta-btn {
        display: block;
        padding: var(--profile-spacing-md) var(--profile-spacing-lg); /* Match bottom CTA height */
        font-size: 1rem; /* Match bottom CTA font size */
    }
    
    /* Hide share button on desktop */
    .share-btn {
        display: none;
    }
}

/* Social Links Section */
.social-links-container {
    display: flex;
    flex-direction: column;
    gap: var(--profile-spacing-sm);
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: var(--profile-spacing-md);
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    border-radius: var(--profile-radius-md);
    background-color: var(--profile-card-bg);
    border: 1px solid var(--profile-border-color);
    color: var(--profile-text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.social-link-item:hover {
    background-color: var(--profile-bg);
    border-color: var(--profile-accent);
    transform: translateX(4px);
}

.social-link-item:hover > svg,
.social-link-item:hover span {
    color: var(--profile-accent);
}

.social-link-item > svg {
    width: 24px;
    height: 24px;
    color: var(--profile-accent);
    transition: color 0.2s ease;
}

.social-link-item span {
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
    margin-right: auto;
}

.social-link-item > svg.external-arrow {
    width: 18px;
    height: 18px;
    color: var(--profile-accent);
    transition: color 0.2s ease;
    opacity: .8;
}

.social-link-item:hover > svg.external-arrow {
    color: var(--profile-accent);
}

/* Dark mode adjustments for social links */
.dark .social-link-item {
    background-color: var(--profile-card-bg);
    border-color: var(--profile-border-color);
}

.dark .social-link-item:hover {
    background-color: var(--profile-bg);
    border-color: var(--profile-accent);
}

.dark .social-link-item:hover > svg,
.dark .social-link-item:hover span {
    color: var(--profile-accent);
} 