.text-primary {
    color: var(--primary-color) !important;
}
/* Main container styles */
.container {
    max-width: 1200px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-link {
    color: var(--primary-color) !important;
}
.back-link i {
    margin-right: 8px;
}

/* Product section */
#product-group-layout {
    padding: 2rem 0;
}

.product-image-container {
    width: 100%;
    height: auto;
}

.rounded-20 {
    border-radius: 20px;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.favorite-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.product-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.product-description {
    line-height: 1.6;
    color: var(--text-primary);
}

.card {
    color: var(--text-primary) !important;
}
.meta-category,
.meta-link,
.meta-results {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.meta-link {
    text-decoration: none;
    color: var(--text-primary);
}

.meta-link:hover {
    text-decoration: underline;
}

.booking-button {
    background-color: var(--cta-yellow);
    color: white;
    border: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.booking-button:hover {
    background-color: var(--cta-yellow-hover);
    color: white;
}

/* Accordion section */
.section-title {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-primary);
}

#serviceAccordion .card {
    border: none;
    border-radius: 0;
}

#serviceAccordion .card-header {
    padding: 0;
}

#serviceAccordion .btn-link {
    color: var(--text-primary);
    text-decoration: none;
    width: 100%;
    text-align: left;
    position: relative;
}

#serviceAccordion .btn-link:hover,
#serviceAccordion .btn-link:focus {
    text-decoration: none;
}

#serviceAccordion .btn-link i {
    transition: transform 0.3s;
}

#serviceAccordion .btn-link.collapsed i {
    transform: rotate(180deg);
}

/* Feature section */
.feature-card {
    margin-bottom: 2rem;
}

.feature-content {
    border-radius: 8px;
    height: 100%;
}

.feature-step {
    font-size: 1rem;
    color: var(--text-primary);
}

.feature-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Instruction section */
.instruction-title {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-primary);
}

.instruction-card {
    border-radius: 8px;
}

.instruction-step {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.instruction-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Linkable service card styles */
.service-card {
    color: var(--text-primary);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

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

/* Fix for blue links in service cards */
a.service-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

a.service-card-link:hover,
a.service-card-link:focus,
a.service-card-link:active {
    color: inherit;
    text-decoration: none;
}

/* Keep the original colors for buttons inside linked cards */
a.service-card-link .booking-button {
    background-color: var(--cta-yellow);
    color: white;
}

a.service-card-link .booking-button:hover {
    background-color: var(--cta-yellow-hover);
    color: white;
}

/* Keep text colors consistent */
a.service-card-link .card-title,
a.service-card-link .card-text,
a.service-card-link .badge,
a.service-card-link .font-weight-bold {
    color: var(--text-primary);
}

/* Preserve badge color */
a.service-card-link .badge-primary {
    background-color: var(--primary-color);
    color: white;
}
.badge-primary {
    background-color: var(--primary-color);
}

.rounded-pill {
    border-radius: 50rem;
}

.text-decoration-underline {
    text-decoration: underline;
}

/* Sticky bottom bar */
.sticky-bottom-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sticky-bottom-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--cta-yellow) 0%, #e8f8f7 100%);
}

/* Bootstrap 4 specific utilities that were used in Bootstrap 5 */
.rounded-pill {
    border-radius: 50rem !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .product-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.25rem;
    }

    .sticky-bottom-bar .booking-button {
        width: 100%;
        margin-top: 1rem;
    }

    .mr-2 {
        margin-right: 0.5rem !important;
    }

    .ml-2 {
        margin-left: 0.5rem !important;
    }

    .pl-4 {
        padding-left: 1.5rem !important;
    }
}

/* Service card image styles */
.service-card-image {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 200px;
}

.service-thumbnail {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-thumbnail {
    transform: scale(1.05);
}

/* Existing service card styles */
.service-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    overflow: hidden;
    border: none;
}

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

/* Service Detail Page Styles */

/* Breadcrumb Styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

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

.breadcrumb-item a:hover {
    color: var(--primary-hover);
}

.breadcrumb-item.active {
    color: var(--text-light);
}

/* Product Image Container */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.farmalysia-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-hover)
    );
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(240, 125, 0, 0.3);
}

/* Test Category and Availability */
.test-category {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.availability-badge {
    background-color: #e8f5e8;
    color: #2d5016;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Test Highlights */
.test-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.highlight-item i {
    width: 20px;
    text-align: center;
}

/* Description with Read More */
.description-wrapper {
    position: relative;
}

.description-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    line-height: 1.6;
}

.description-content.collapsed {
    max-height: 150px;
}

.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.description-content.collapsed + .gradient-overlay {
    opacity: 1;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.read-more-btn:hover {
    color: var(--primary-hover);
}

.less-text,
.less-icon {
    display: none;
}

.read-more-btn.expanded .more-text,
.read-more-btn.expanded .more-icon {
    display: none;
}

.read-more-btn.expanded .less-text,
.read-more-btn.expanded .less-icon {
    display: inline;
}

/* Pricing Section */
.pricing-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.price-label {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.booking-button {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-hover)
    );
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.booking-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
    color: white;
}

/* Parameters Section */
.parameters-container {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.parameters-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.parameter-card {
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.parameter-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.1);
}

.parameter-header {
    background-color: #f8f9fa;
}

.parameter-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.parameter-toggle:hover {
    background-color: #e9ecef;
}

.parameter-info {
    text-align: left;
}

.parameter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.parameter-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.parameter-body {
    padding: 20px;
    background-color: white;
    border-top: 1px solid #e9ecef;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Process Steps Section */
.process-step {
    background-color: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 35px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-hover)
    );
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.step-icon {
    width: 80px;
    height: 80px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 25px;
    color: var(--primary-color);
    font-size: 2rem;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.process-step:hover .step-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.step-description {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Preparation Cards */
.preparation-card {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.preparation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.prep-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-hover)
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.prep-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.prep-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prep-list li {
    padding: 8px 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 25px;
    line-height: 1.5;
}

.prep-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Pharmacy Network Info Section */
.pharmacy-network-info {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-hover)
    );
    position: relative;
    overflow: hidden;
}

.pharmacy-network-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.pharmacy-network-info .container {
    position: relative;
    z-index: 2;
}

.pharmacy-network-info h3 {
    font-weight: 600;
    margin-bottom: 15px;
}

.pharmacy-network-info .btn-light {
    background-color: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pharmacy-network-info .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

/* Related Services Cards Enhancement */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.card-badge .badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 5px 10px;
}

.test-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Sticky Bottom Bar Enhanced */
.sticky-bottom-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 3px solid var(--primary-color);
}

.service-summary h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.availability-text {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.availability-badge-sticky {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.availability-badge-sticky i {
    color: var(--primary-color);
}

.sticky-cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    color: white;
    font-weight: 600;
    border-radius: var(--button-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(115, 39, 83, 0.3);
    color: white;
}

.price-summary {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price-summary .price-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.price-summary .price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .test-highlights {
        padding: 15px;
    }

    .highlight-item {
        font-size: 0.9rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .parameters-container {
        padding: 30px 20px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .test-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .price-display {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .price-value {
        font-size: 1.5rem;
    }

    .process-step {
        padding: 25px 15px;
        margin-bottom: 30px;
    }

    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .preparation-card {
        padding: 25px 20px;
    }

    /* Compact sticky bar on mobile */
    .sticky-bottom-bar {
        padding: 0;
    }

    .sticky-bottom-bar .container {
        padding: 8px 12px;
    }

    .sticky-bottom-bar .d-flex {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
        padding: 0 !important;
    }

    .sticky-bottom-bar .service-summary {
        flex: 1;
        text-align: left;
        min-width: 0;
    }

    .sticky-bottom-bar .service-summary h4 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 2px;
    }

    .sticky-bottom-bar .availability-badge-sticky {
        font-size: 0.7rem;
        display: none;
    }

    .sticky-bottom-bar .sticky-cta-button {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .sticky-bottom-bar .sticky-cta-button i {
        display: none;
    }
}

@media (max-width: 480px) {
    .farmalysia-badge {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .parameter-toggle {
        padding: 15px;
    }

    .parameter-title {
        font-size: 1rem;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    /* Even more compact sticky bar on small mobile */
    .sticky-bottom-bar .container {
        padding: 6px 10px;
    }

    .sticky-bottom-bar .d-flex {
        gap: 8px;
    }

    .sticky-bottom-bar .service-summary h4 {
        font-size: 0.75rem;
    }

    .sticky-bottom-bar .sticky-cta-button {
        padding: 8px 12px;
        font-size: 0.75rem;
        border-radius: 20px;
    }
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Hover Effects */
.booking-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.booking-button:hover::before {
    left: 100%;
}

/* Focus States for Accessibility */
.booking-button:focus,
.parameter-toggle:focus,
.read-more-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .sticky-bottom-bar,
    .action-buttons,
    .pharmacy-network-info {
        display: none;
    }

    .container {
        max-width: none;
    }

    .service-card {
        break-inside: avoid;
    }
}
