/* 
 * Tham Clinic Website Styles
 * Modern medical website design with responsive layout
 */


:root {
    /* Primary Colors */
    --primary: #2b8a96;       /* Teal blue-green for a more elegant look */
    --primary-light: #e6f4f5;
    --primary-dark: #1c5c64;
    
    /* Secondary Colors */
    --secondary: #34a853;
    --secondary-light: #e6f4ea;
    --warning: #fbbc04;
    --warning-light: #fef7e0;
    
    /* Neutral Colors */
    --dark: #202124;
    --gray: #5f6368;
    --light-gray: #dadce0;
    --lighter-gray: #e8eaed;
    --lightest-gray: #f8f9fa;
    --white: #ffffff;
    
    /* Font Families */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

/* Base Styles */
/* Added a line about text-autospace. refer: https://webkit.org/blog/16574/webkit-features-in-safari-18-4/ */
body {
    font-family: var(--body-font);
    color: var(--dark);
    line-height: 1.6;
    text-autospace: normal;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    color: var(--dark);
}

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

a:hover {
    color: var(--primary-dark);
}

.section-title {
    position: relative;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* Utility Classes */
.bg-primary {
    background-color: var(--primary) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-secondary-light {
    background-color: var(--secondary-light) !important;
}

.bg-warning {
    background-color: var(--warning) !important;
}

.bg-warning-light {
    background-color: var(--warning-light) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Header Styles */
.top-bar {
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--dark) !important;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover:after, .nav-link.active:after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    background: linear-gradient(rgba(248, 249, 250, 0.9), rgba(248, 249, 250, 0.9)), url('../images/clinic_room.jpeg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-section p.lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-section .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
}

.hero-section .img-fluid {
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.hero-section .img-fluid:hover {
    transform: translateY(-10px);
}

/* Services Highlight */
.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    transition: all 0.3s ease;
}

.services-highlight .card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
}

.services-highlight .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.services-highlight .card:hover .service-icon {
    background: var(--primary);
    color: white;
}

.services-highlight .card-body {
    padding: 2rem;
}

.services-highlight .card-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.services-highlight .btn-link {
    font-weight: 600;
    padding: 0;
    margin-top: 1rem;
}

/* Doctor Profile */
.doctor-profile {
    background-color: var(--white);
    padding: 5rem 0;
}

.doctor-profile img {
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.doctor-profile img:hover {
    transform: scale(1.03);
}

.doctor-profile h3 {
    font-weight: 700;
}

.credential-item {
    display: flex;
    align-items: center;
    background: var(--lightest-gray);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.credential-item:hover {
    background: var(--primary-light);
}

.credential-item i {
    font-size: 1.25rem;
}

/* Hours & Location */
.hours-location {
    background-color: var(--lightest-gray);
    padding: 5rem 0;
}

.hours-location .card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hours-location .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.hours-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--lighter-gray);
}

.hours-list li:last-child {
    border-bottom: none;
}

.day {
    font-weight: 600;
}

.location-map {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
}

.cta-section h2 {
    font-weight: 700;
    color: white;
}

.cta-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.cta-section .btn {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-section .btn-light:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Footer */
.footer {
    background-color: #1e2124;
}

.footer h4, .footer h5 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary);
    color: var(--white);
}

.contact-info li i {
    color: var(--primary);
}

.quick-links li {
    margin-bottom: 0.75rem;
}

.quick-links a {
    color: var(--lighter-gray);
    transition: all 0.3s ease;
}

.quick-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer hr {
    opacity: 0.1;
}

.list-inline-item:not(:last-child) {
    margin-right: 1.5rem;
}

.list-inline-item a {
    color: var(--lighter-gray);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.75rem;
    }
    
    .top-bar {
        font-size: 0.8rem;
    }
    
    /* Hide long opening hours text on mobile to prevent overflow */
    .top-bar .col-md-9 .en-content,
    .top-bar .col-md-9 .zh-content {
        display: none;
    }
    
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .navbar-nav {
        margin-bottom: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.25rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }

    .top-bar {
        text-align: center;
        font-size: 0.8rem;
    }
    
    .top-bar .col-md-3,
    .top-bar .col-md-9 {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .top-bar .col-md-9:last-child {
        margin-bottom: 0;
    }
    
    .doctor-profile {
        text-align: center;
    }
    
    .credential-item {
        justify-content: center;
    }
    
    /* Ensure page header text wraps properly on mobile */
    .page-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .page-header .display-4 {
        font-size: 2rem;
    }
}

/* Page-specific Styles */

/* About Page */
.about-section .img-wrapper {
    position: relative;
    z-index: 1;
}

.about-section .img-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background-color: var(--primary-light);
    z-index: -1;
}

/* Services Page */
.service-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Doctor Page */
.doctor-qualifications li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.doctor-qualifications li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
}

/* Hours Page */
.special-note {
    background-color: var(--warning-light);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    margin: 1.5rem 0;
}

/* Appointments Page */
.appointment-steps .step {
    display: flex;
    margin-bottom: 2rem;
}

.appointment-steps .step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

/* Payment Page */
.payment-method {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--lighter-gray);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.payment-method-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    border-radius: 10px;
    margin-right: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Location Page */
.transport-option {
    margin-bottom: 2rem;
}

.transport-option h4 {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.transport-option h4 i {
    margin-right: 0.75rem;
    color: var(--primary);
}

.bus-routes span {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Contact Page */
.contact-form .form-control {
    padding: 0.75rem 1.25rem;
    border-color: var(--lighter-gray);
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(26, 115, 232, 0.25);
}

.contact-info-card {
    padding: 2rem;
    border-radius: 10px;
    background-color: var(--primary-light);
    height: 100%;
}

.contact-info-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.contact-info-item i {
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background-color: var(--white);
}

.testimonial-card {
    background-color: var(--lightest-gray);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-card:before {
    content: "\201C";
    font-family: Georgia, serif;
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: var(--primary-light);
    line-height: 1;
    z-index: 0;
}

.testimonial-content {
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.testimonial-author-name {
    font-weight: 600;
    margin-bottom: 0;
}

.testimonial-author-title {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Stats Counter */
.stats-counter {
    padding: 5rem 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/clinic_interior.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.counter-item {
    text-align: center;
    color: white;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

.counter-title {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Animation classes */
.fadeInUp {
    animation: fadeInUp 1s ease;
}

.fadeIn {
    animation: fadeIn 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Page Header Section */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3rem 0;
}

.page-header h1 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.page-header .display-4 {
    font-size: 3rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: nowrap;
}

.breadcrumb-item {
    white-space: nowrap;
}

/* Breadcrumb styles */
.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    font-weight: 400;
    color: white;
    padding: 0 8px;
}

/* Responsive adjustments for page header */
@media (max-width: 767.98px) {
    .page-header .display-4 {
        font-size: 2.5rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
}

/* Contact Page Specific Styles */
.contact-info .contact-item .contact-icon {
    width: 50px;  /* Ensure a fixed width */
    height: 50px; /* Ensure a fixed height */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Center icon vertically */
    justify-content: center; /* Center icon horizontally */
    flex-shrink: 0; /* Prevent shrinking */
    background-color: var(--primary-light); /* Use variable for consistency */
    border-radius: 50%; /* Ensure it's a circle */
}

.contact-info .contact-item .contact-icon i {
    font-size: 1.25rem; /* Adjust icon size if needed */
    color: var(--primary);
}

.footer .social-icon i {
    font-size: 1rem;
}

/* Location Page Specific Styles */
.getting-here .transport-icon {
    width: 60px;  /* Adjust size as needed */
    height: 60px; /* Adjust size as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    border-radius: 50%;
    margin-left: auto;  /* Optional: centers the circle if container allows */
    margin-right: auto; /* Optional: centers the circle if container allows */
}

.getting-here .transport-icon i {
    font-size: 1.5rem; /* Adjust icon size */
    color: var(--primary);
}

.nearby-amenities .amenity-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    border-radius: 50%;
}

.nearby-amenities .amenity-icon i {
     font-size: 1.25rem;
     color: var(--primary);
}

/* Services Page Specific Styles */
.service-features li {
    transition: transform 0.2s ease;
    display: flex; /* Add flexbox */
    align-items: center; /* Align icon and text vertically */
    margin-bottom: 0.5rem; /* Adjust spacing */
}

.service-features li i {
    margin-right: 0.5rem; /* Space between icon and text */
}

.service-item .service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; /* Adjusted icon size */
    background-color: var(--primary-light);
    border-radius: 50%;
    margin-bottom: 1rem; /* Space below icon */
    /* Removed margin-left/right auto to keep it left-aligned */
}

.service-item .service-icon i {
    color: var(--primary);
}

.accordion-button i {
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed) i.fa-question-circle {
    /* Optional: Rotate icon when expanded, example */
    /* transform: rotate(180deg); */
}

/* 
 * 添加这个注释用于测试哈希值变化
 */

/* Doctor profile text left alignment on mobile */
.doctor-profile .col-lg-7 p {
    text-align: left;
}

.doctor-profile .col-lg-7 h2,
.doctor-profile .col-lg-7 .lead {
    text-align: left;
}
