:root {
    --primary-color: #3A7BD5;
    --primary-dark: #2E6ABF;
    --primary-light: #E7F0FF;
    --secondary-color: #36B37E;
    --accent-color: #FF7E67;
    --text-color: #2F3B4C;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 4px 12px rgba(58, 123, 213, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Global Styles - Optimized */
body, html {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

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

/* Combined button styles */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #2a5ca8);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(58, 123, 213, 0.25);
}

.btn-lg {
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Section title with reduced selectors */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
}

.section-title:after {
    content: "";
    position: absolute;
    height: 4px;
    width: 80px;
    background-color: var(--primary-color);
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

section {
    padding: 4rem 0; /* Reduced padding */
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Navbar - Optimized */
.navbar {
    padding: 0.8rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-white);
}

.navbar-brand img {
    transition: var(--transition);
    max-height: 50px;
}

.nav-item {
    margin: 0 0.3rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.8rem 1rem !important;
    border-radius: 4px;
    transition: var(--transition);
}

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

.nav-link.btn {
    color: white !important;
    margin-left: 0.5rem;
}

.nav-link.btn:hover {
    background-color: var(--primary-dark);
    color: white !important;
    transform: translateY(-2px) !important;
}

/* Hero Section - Simplified */
.hero {
    background-color: #2C3E50;
    color: white;
    text-align: center;
    padding: 8rem 0 5rem;
    position: relative;
    z-index: 1;
}

.text-center {
    text-align: center !important;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 600px;
    line-height: 1.6;
}

/* Cards - Consolidated styles */
.service-card, .value-card, .equipment-card, .about-stat, .why-us-item {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    margin-bottom: 1.5rem;
}

/* Price badge on service cards */
.price-badge {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.service-card:hover, .value-card:hover, .equipment-card:hover, .about-stat:hover, .why-us-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Doctors Section - Optimized */
.doctors {
    background-color: var(--primary-light);
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.doctors:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.doctors .container {
    position: relative;
    z-index: 1;
}

.doctor-card {
    margin-bottom: 1.5rem;
    height: 100%;
    perspective: 1000px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.doctor-card-inner {
    background-color: var(--bg-white);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.doctor-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
}

.doctor-specialty {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.doctor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    transform-origin: center;
    will-change: transform;
}

.doctor-img-container:hover .doctor-image {
    transform: scale(1.05);
}

.doctor-info {
    padding: 1rem;
    text-align: center;
}

.doctor-info h4 {
    margin-bottom: 0.2rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.doctor-info p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.doctor-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 0.4rem;
}

.doctor-experience, .doctor-patients {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
    background-color: var(--bg-light);
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
}

.doctor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(58, 123, 213, 0.8), transparent 70%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.doctor-img-container:hover .doctor-overlay {
    opacity: 1;
}

.doctor-social {
    display: flex;
    gap: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.doctor-img-container:hover .doctor-social {
    transform: translateY(0);
    opacity: 1;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

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

/* Footer - Simplified */
.footer {
    background: linear-gradient(to right, #000428, #004e92);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.footer h5 {
    color: white;
    position: relative;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.footer h5:after {
    content: "";
    position: absolute;
    height: 2px;
    width: 30px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-contact li i {
    width: 25px;
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer hr {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 150px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 115, 230, 0.3);
}

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

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

/* Interior Pages Enhancement - Simplified */
.hero[style*="height: 50vh"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    height: auto !important;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
}

.cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.cta .container {
    position: relative;
    z-index: 1;
}

/* Optimized Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Optimized Media Queries - Consolidated */
@media (max-width: 991.98px) {
    section {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .navbar-collapse {
        background-color: var(--bg-white);
        padding: 1.2rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        margin-top: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-item {
        margin: 0.3rem 0;
    }
    
    .doctor-img-container {
        aspect-ratio: 3/4;
    }
    
    .doctor-card, .service-card, .testimonial-card, .equipment-card, .value-card {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 767.98px) {
    section {
        padding: 2.5rem 0;
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .doctor-card, .service-card, .testimonial-card, .equipment-card, .value-card {
        max-width: 260px;
    }
    
    .doctor-meta {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .doctor-info {
        padding: 0.8rem;
    }
    
    .doctor-info h4 {
        font-size: 1.1rem;
    }
    
    /* Container padding for mobile */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 575.98px) {
    .hero {
        padding: 5rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }
    
    .service-card, .doctor-card, .testimonial-card, .equipment-card, .value-card {
        max-width: 100%;
        padding: 1.2rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Fix for mobile overflow issues */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Styles for Services Detail Page */
.service-detail-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.service-detail-card .service-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90px;
    height: 90px;
    margin: 0 auto;
    background-color: var(--primary-light);
    border-radius: 50%;
    color: var(--primary-color);
}

.service-description p {
    color: var(--text-color);
    line-height: 1.8;
}

.service-price .price-badge {
    font-size: 1.2rem;
    font-weight: 700;
}

.service-benefits .list-group-item {
    padding: 0.8rem 0;
    border-color: #eee;
}

.service-benefits .list-group-item i {
    font-size: 1.2rem;
}

.related-services .service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--bg-white);
    border: none;
}

.related-services .service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-services .service-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

@media (max-width: 767.98px) {
    .service-detail-card {
        padding: 1.2rem;
    }
    
    .service-price .price-badge {
        font-size: 1rem;
    }
    
    .service-benefits .list-group-item {
        padding: 0.6rem 0;
    }
}

/* Styles for Service Gallery */
.service-gallery .gallery-item {
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.service-gallery .gallery-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-gallery .gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

.service-gallery .caption {
    text-align: center;
    font-size: 0.85rem;
}

.service-featured-image img {
    max-height: 400px;
    object-fit: contain;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-img-top-container {
    height: 180px;
    overflow: hidden;
}

.card-img-top-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-img-top-container img {
    transform: scale(1.05);
}

@media (max-width: 767.98px) {
    .service-gallery .gallery-thumb {
        height: 140px;
    }
    
    .service-featured-image img {
        max-height: 300px;
    }
    
    .card-img-top-container {
        height: 150px;
    }
}

/* Styles for Service Images */
.service-image-container {
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin: -1.5rem -1.5rem 1rem -1.5rem;
}

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

.service-card:hover .service-image {
    transform: scale(1.08);
}

.gallery-count {
    color: var(--text-light);
    display: inline-block;
}

.service-meta {
    display: flex;
    justify-content: flex-start;
    margin-top: -10px;
    margin-bottom: 10px;
}

@media (max-width: 767.98px) {
    .service-image-container {
        height: 160px;
    }
}

/* Results Styles */
.result-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(58, 123, 213, 0.2);
}

.result-image-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.result-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.4s ease;
}

.result-card:hover .result-image {
    transform: scale(1.03);
}

.result-card h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.result-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex: 1;
}

.result-detail .result-image-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-detail .result-image-container:hover {
    transform: scale(1.02);
}

.result-detail h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.result-description {
    color: var(--text-light);
    line-height: 1.7;
}

.cta-box {
    background-color: var(--primary-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.cta-box h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.cta-box p {
    margin-bottom: 1.5rem;
}

.other-results {
    background-color: var(--bg-light);
    padding: 4rem 0;
}

.other-results h2 {
    margin-bottom: 2.5rem;
}

@media (max-width: 767.98px) {
    .result-card {
        margin-bottom: 1.5rem;
    }
    
    .result-detail .row {
        flex-direction: column;
    }
    
    .result-detail .result-image-container {
        margin-bottom: 1.5rem;
    }
}

/* End Results Styles */ 