@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

nav .bg-accent {
    position: fixed;
    right: 20px;
    top: 225px;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0F172A;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(14, 165, 233, 0.3);
    border-radius: 50%;
    border-top: 5px solid #0EA5E9;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.py-3 {
    padding-top: 0.85rem !important;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0EA5E9;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    z-index: 100;
}

.scroll-top.show {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #0d94d1;
    transform: translateY(-5px);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

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

.pulse {
    animation: pulse-slow 2s infinite;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%230ea5e9' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

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

.pulse {
    animation: pulse-slow 2s infinite;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%230ea5e9' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0EA5E9;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 2rem;
    }
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%230ea5e9' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.appointment-form {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.appointment-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.success-message {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.success-message.show {
    display: block;
    opacity: 1;
}

.time-slot {
    transition: all 0.2s ease;
    cursor: pointer;
}

.time-slot:hover {
    background: #0EA5E9;
    color: white;
}

.time-slot.selected {
    background: #0EA5E9;
    color: white;
}

.blog-card {
    transition: all 0.3s ease;
}

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

.tag {
    transition: all 0.2s ease;
}

.tag:hover {
    background: #0EA5E9;
    color: white;
}

.pagination .page-item.active .page-link {
    background: #0EA5E9;
    color: white;
    border-color: #0EA5E9;
}

.pagination .page-link {
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #0EA5E9;
    color: white;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #0F172A;
}

.dark .article-content h2 {
    color: #F8FAFC;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #334155;
}

.dark .article-content p {
    color: #CBD5E1;
}

.article-content blockquote {
    border-left: 4px solid #0EA5E9;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #475569;
}

.dark .article-content blockquote {
    color: #94A3B8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-content img {
    border-radius: 1rem;
    margin: 2rem 0;
    max-width: 100%;
}

.article-content .highlight-box {
    background-color: #F0F9FF;
    border-left: 4px solid #0EA5E9;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.dark .article-content .highlight-box {
    background-color: #0C4A6E;
    border-left: 4px solid #38BDF8;
}

.contact-card {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.success-message {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.success-message.show {
    display: block;
    opacity: 1;
}

.map-container {
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
}


.doctor-card {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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



.specialty-badge {
    transition: all 0.3s ease;
}

.specialty-badge:hover {
    background: #0EA5E9;
    color: white;
    transform: scale(1.05);
}

.availability-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.doctor-modal {
    transition: all 0.4s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(50px);
}

.doctor-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.symptom-item {
    transition: all 0.3s ease;
    border-left: 4px solid #EF4444;
}

.symptom-item:hover {
    transform: translateX(5px);
    background: #FEF2F2;
}

.dark .symptom-item {
    border-left: 4px solid #F87171;
}

.dark .symptom-item:hover {
    background: #1F2937;
}

.appointment-tab {
    transition: all 0.3s ease;
}

.appointment-tab.active {
    background-color: #0EA5E9;
    color: white;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-confirmed {
    background-color: #DCFCE7;
    color: #166534;
}

.status-completed {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-cancelled {
    background-color: #FEE2E2;
    color: #991B1B;
}

.status-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.appointment-card {
    transition: all 0.3s ease;
}

.appointment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.empty-state {
    transition: all 0.5s ease;
}

.empty-state:hover {
    transform: scale(1.02);
}

.testimonial-card {
    transition: all 0.3s ease;
}

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

.eye-diagram {
    position: relative;
    width: 300px;
    height: 300px;
}

.eye-part {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s ease;
}

.eye-part:hover {
    transform: scale(1.05);
    z-index: 10;
}

.service-tab {
    transition: all 0.3s ease;
}

.service-tab.active {
    background: #0EA5E9;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.dark .modal-content {
    background: #0F172A;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #0EA5E9;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.toc-section {
    scroll-margin-top: 100px;
}

.toc-link {
    transition: all 0.3s ease;
}

.toc-link:hover {
    color: #0EA5E9;
    transform: translateX(5px);
}

.toc-link.active {
    color: #0EA5E9;
    font-weight: 600;
}




/* Ensure all containers don't exceed viewport width */
.max-w-7xl {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Fix for elements that might be positioned outside viewport */
.floating-badges {
    position: relative;
}

@media (max-width: 500px) {
    nav .bg-accent {
        position: static !important;
        font-size: 12px;padding: 6px;
    }
}


@media (max-width: 768px) {

    /* Adjust floating badges on mobile */
    .animate-on-scroll {
        position: static !important;
        margin: 10px 0;
    }

    /* Ensure images don't cause overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Fix grid layouts on mobile */
    .grid {
        width: 100%;
    }

    /* Adjust padding for mobile */
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Fix for hero section on mobile */
    .hero-pattern {
        display: none;
    }

    /* Ensure form elements don't overflow */
    input,
    select,
    textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

}


/* ✅ Global fix for horizontal scroll */
html,
body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
}

/* ✅ Prevent any child from exceeding viewport width */
* {
    box-sizing: border-box;
}

/* ✅ Clip instead of scroll (modern browsers) */
body {
    overflow-x: clip !important;
}

/* ✅ Fix elements with negative or absolute offsets */
[class*="absolute"],
[class*="fixed"] {
    max-width: 100vw;
    overflow-x: hidden;
}