/* Global Styles */
:root {
    --primary-color: #3b82f6; /* Blue */
    --secondary-color: #10b981; /* Green */
    --accent-color: #6366f1; /* Indigo */
    --text-color: #374151; /* Cool Gray 700 */
    --text-light: #6b7280; /* Cool Gray 500 */
    --bg-color: #f9fafb; /* Cool Gray 50 */
    --bg-light: #ffffff;
    --border-color: #e5e7eb; /* Cool Gray 200 */
    --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);
    --border-radius: 8px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding-top: 70px; /* For fixed navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4 {
    margin-bottom: 0.8em;
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

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

.highlight {
    color: var(--secondary-color);
}

/* Navbar */
.navbar {
    background-color: var(--bg-light);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
}
.nav-menu a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: #2563eb; /* Darker blue */
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background-color: #059669; /* Darker green */
    color: white;
    transform: translateY(-2px);
}
.btn-full {
    width: 100%;
    margin-top: 1rem;
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5em;
}
.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Doctors Section */
.doctors-section {
    padding: 60px 0;
}
.doctors-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.doctor-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.doctor-card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center top; /* Focus on face */
}
.doctor-card-content {
    padding: 1.5rem;
}
.doctor-card-content h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}
.doctor-title {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.doctor-rating {
    margin-bottom: 0.8rem;
    color: #f59e0b; /* Amber 500 */
}
.doctor-rating .experience {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}
.doctor-specialties-preview {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    min-height: 3.8em; /* approx 3 lines */
}

/* Footer */
.footer-section {
    background-color: var(--text-color);
    color: var(--bg-light);
    padding: 40px 0;
    text-align: center;
}
.footer-section p {
    margin-bottom: 0.5rem;
}
.footer-section a {
    color: var(--secondary-color);
}

/* Doctor Detail Page */
.doctor-detail-hero {
    background-color: var(--bg-light);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}
.doctor-profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.profile-image-lg img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-light);
    box-shadow: var(--shadow-md);
}
.profile-info-lg h1 {
    margin-top: 0;
    color: var(--primary-color);
}
.profile-info-lg h2 {
    font-size: 1.4rem;
    color: var(--text-light);
    font-weight: 400;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}
.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.profile-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}
.profile-meta i {
    color: var(--secondary-color);
}
.specialties-tags .tag {
    display: inline-block;
    background-color: var(--primary-color-light, #e0e7ff);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.doctor-detail-content {
    padding: 40px 0;
}
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
}
.main-content h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}
.education-list {
    list-style: none;
    padding-left: 0;
}
.education-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}
.education-list li::before {
    content: "\f19d"; /* fa-graduation-cap */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}
.education-list strong {
    display: block;
    font-size: 1.1rem;
}
.education-list p {
    margin: 0.2rem 0 0;
    color: var(--text-light);
}

.reviews-list .review-item {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.review-header strong {
    font-size: 1.1rem;
}
.review-header em {
    font-size: 0.9rem;
    color: var(--text-light);
}
.review-rating .fa-star {
    color: #e0e0e0; /* light grey for empty star */
}
.review-rating .fa-star.filled {
    color: #f59e0b; /* Amber */
}
.review-item p {
    font-style: italic;
    color: var(--text-light);
}

.sidebar-content .contact-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
.contact-card h4 {
    margin-top: 0;
    color: var(--primary-color);
}
.contact-card p {
    display: flex;
    align-items: flex-start; /* Align icon with first line of text */
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.contact-card p i {
    color: var(--secondary-color);
    margin-top: 0.2em; /* Align icon slightly better */
    width: 20px; /* Give icon fixed width */
    text-align: center;
}
.back-link-container {
    margin-top: 2rem;
    text-align: center;
}
.back-link-container .btn i {
    margin-right: 0.5rem;
}


/* Responsive */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-content {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    body { padding-top: 60px; }
    .navbar { padding: 0.6rem 0; }
    .nav-menu {
        display: none; /* Simple hide for now, could implement toggle */
    }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    
    .doctor-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-image-lg { margin-bottom: 1rem; }
    .profile-meta { justify-content: center; }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    .hero-section { padding: 60px 0; }
    .hero-section h1 { font-size: 2.2rem; }
    .doctors-grid { grid-template-columns: 1fr; }
}


/* Sidebar Contact Card Fixes & Enhancements */
.sidebar-content .contact-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex; /* Enable flex for better control */
    flex-direction: column; /* Stack items vertically */
}

.contact-card h4 {
    margin-top: 0;
    color: var(--primary-color);
    margin-bottom: 1.2rem; /* More space below title */
}

.contact-card p {
    display: flex;
    align-items: flex-start; 
    gap: 0.8rem;
    margin-bottom: 1rem; /* Consistent spacing */
    font-size: 0.95rem;
    line-height: 1.5; /* Ensure text wraps nicely */
}

.contact-card p i {
    color: var(--secondary-color);
    margin-top: 0.25em; /* Adjust icon vertical alignment */
    width: 20px; 
    text-align: center;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.contact-card p span,
.contact-card p a {
    flex-grow: 1; /* Allow text to take remaining space and wrap */
    word-break: break-word; /* Break long words if necessary */
}


.contact-card .btn-full {
    width: 100%;
    margin-top: 1rem; /* Space above button */
    padding: 0.8rem 1rem; /* Adjust button padding if needed */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}


/* Styles for reviewer title to be on a new line or styled differently if needed */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align items to the top */
    margin-bottom: 0.5rem;
    flex-wrap: wrap; /* Allow wrapping if space is tight */
}

.review-header > div { /* Wrapper for name and title */
    margin-right: 1rem; /* Space between name/title block and rating */
}

.review-header strong {
    font-size: 1.1rem;
    display: block; /* Make name take full width available to it */
}
.reviewer-title {
    font-size: 0.85em;
    color: var(--text-light);
    display: block; /* Make title appear on a new line below name */
    margin-top: 0.1em;
}

.review-rating {
    white-space: nowrap; /* Prevent rating stars from wrapping */
    margin-top: 0.1em; /* Align rating with name */
}


/* Doctor Card Image - ensure it's a circle for avatar effect */
.doctor-card-image img {
    width: 100%;
    height: 250px; /* Or a fixed height you prefer */
    object-fit: cover;
    /* To make it a circle if desired for avatars: */
    /* border-radius: 50%; */
    /* If using circle, you might want to adjust the container or image size */
}

/* Profile Image Large on Detail Page - ensure it's a circle */
.profile-image-lg img {
    width: 200px; /* Or desired size */
    height: 200px; /* Same as width for circle */
    border-radius: 50%;
    object-fit: cover;
    object-position: center top; /* Focus on face */
    border: 5px solid var(--bg-light);
    box-shadow: var(--shadow-md);
}


/* Responsive adjustments for sidebar */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-content {
        margin-top: 2rem;
    }
    .contact-card {
        max-width: 500px; /* Prevent it from becoming too wide on larger medium screens */
        margin-left: auto;
        margin-right: auto;
    }
}


.contact-card a {
    width: 85% !important;
}