/* Custom CSS for RK Hospitals Website */

/* Define custom Tailwind CSS colors for easy use */
/* These will be used directly in Tailwind classes like text-custom-blue */
/* Note: For a true "next level" approach with custom colors, you'd extend
   tailwind.config.js, but for a single HTML/CSS file, direct application
   or simple overrides are more practical. */

/* Custom Blue (from logo) */
.text-custom-blue { color: #004AAD; }
.bg-custom-blue { background-color: #004AAD; }
.border-custom-blue { border-color: #004AAD; }
.focus\:ring-custom-blue:focus { --tw-ring-color: #004AAD; }

/* Darker Blue for backgrounds/cards */
.bg-custom-blue-dark { background-color: #003380; }
.border-custom-blue-dark { border-color: #003380; }

/* Lighter Blue for accents/backgrounds */
.bg-custom-blue-light { background-color: #E0F2FE; } /* Light blue, similar to Tailwind's blue-100 */
.text-custom-blue-light { color: #004AAD; } /* Text color for light blue backgrounds */

/* Custom Red (from logo) */
.text-custom-red { color: #E03030; }
.bg-custom-red { background-color: #E03030; }
.border-custom-red { border-color: #E03030; }
.hover\:bg-custom-red:hover { background-color: #C02828; } /* Slightly darker red on hover */


/* Custom Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fadeIn 0.8s ease-out forwards;
}
.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }

@keyframes pulseSlow {
  0% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.05); opacity: 0.25; }
  100% { transform: scale(1); opacity: 0.15; }
}
.animate-pulse-slow {
  animation: pulseSlow 6s infinite ease-in-out;
}

/* New scroll-based animations for About Us page */
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Re-using fadeIn for fade-in-up effect */
/* @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
} */

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.fade-in-left {
    transform: translateX(-50px);
}

.animate-on-scroll.fade-in-right {
    transform: translateX(50px);
}

.animate-on-scroll.fade-in-up {
    transform: translateY(20px);
}

.animate-on-scroll.scale-in {
    transform: scale(0.9);
}

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

.animate-on-scroll.animate-active.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-on-scroll.animate-active.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-on-scroll.animate-active.fade-in-up {
    animation: fadeIn 0.8s ease-out forwards; /* Re-using existing fadeIn for consistency */
}

.animate-on-scroll.animate-active.scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}


/* Ensure smooth transitions for hover effects */
a, button, .service-card, .doctor-card, .testimonial-card, .facility-card, .package-card {
    transition: all 0.3s ease-in-out;
}

/* Hide scrollbar for doctor scroller but allow scrolling */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Hero Slider Styling */
#hero-slider .slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#hero-slider .slide.active {
    opacity: 1;
}

/* Header Enhancements */
header {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* More prominent shadow */
}

/* Desktop Navigation Links */
nav.hidden.md\:flex a {
    font-size: 1.1rem; /* Slightly larger font size for main nav links */
    font-weight: 600; /* Bolder font weight */
    color: #4B5563; /* Default text color, slightly darker gray */
}
nav.hidden.md\:flex a:hover {
    color: #004AAD; /* Custom blue on hover */
}

/* Services Dropdown Button Styling (Desktop) */
.relative.group > button {
    font-size: 1.1rem; /* Ensure consistency with other main nav links */
    font-weight: 600;
    color: #4B5563;
}
.relative.group > button:hover {
    color: #004AAD;
}


/* Services Dropdown Styling (Desktop) */
.services-dropdown {
    min-width: 200px; /* Adjusted width for a single column */
    z-index: 1001;
    max-height: 300px; /* Added max-height */
    overflow-y: auto; /* Added scroll for overflow */
    left: 0; /* Align to the left of its relative parent */
    top: 100%; /* Position directly below the parent, eliminating gap */
    background-color: #ffffff; /* Brighter background */
    box-shadow: 0 6px 20px rgba(0,0,0,0.2); /* More prominent shadow for a "brighter" feel */
    border-radius: 8px; /* Slightly more rounded corners */
    border: 1px solid #d1d5db; /* Slightly softer border */
    display: grid; /* Use CSS Grid for a single column */
    grid-template-columns: 1fr; /* Single column */
    gap: 0; /* No gap between grid items */
}
.services-dropdown a {
    display: block;
    padding: 10px 20px; /* Reduced padding for a shorter dropdown */
    color: #374151; /* Darker gray for better readability */
    text-align: left;
    white-space: nowrap; /* Keep text on one line within its grid cell */
    font-weight: 500;
    border-bottom: 1px solid #e5e7eb; /* Lighter border for separation */
    background-color: #ffffff;
    font-size: 1.05rem; /* Slightly larger font for dropdown items */
}
/* Remove right border as it's a single column layout */
.services-dropdown a:nth-child(odd) {
    border-right: none;
}
/* Remove bottom border from the last item */
.services-dropdown a:last-child {
    border-bottom: none;
}
.services-dropdown a:hover {
    background-color: #E0F2FE; /* Lighter custom blue on hover */
    color: #004AAD; /* Custom blue on hover */
}

/* Mobile Services Dropdown Styling */
#mobile-services-dropdown {
    max-height: 400px; /* Added max-height, slightly more for mobile */
    overflow-y: auto; /* Added scroll for overflow */
    -webkit-overflow-scrolling: touch;
    width: 100%;
    background-color: #ffffff; /* Consistent background */
    box-shadow: 0 6px 20px rgba(0,0,0,0.2); /* Consistent shadow */
    border-radius: 8px; /* Consistent border-radius */
    border: 1px solid #d1d5db; /* Consistent border */
}

/* Apply single column grid display when the dropdown is active */
#mobile-services-dropdown:not(.hidden) {
    display: grid;
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 0;
}

#mobile-services-dropdown a {
    padding: 10px 20px; /* Reduced padding to match desktop for consistency and shorter dropdown */
    color: #374151; /* Consistent color */
    border-bottom: 1px solid #e5e7eb; /* Consistent border-bottom */
    background-color: #ffffff;
    text-align: left; /* Changed to left to match desktop for consistency */
    white-space: nowrap; /* Keep text on one line */
    font-size: 1.05rem; /* Slightly larger font for mobile dropdown items */
}
/* Remove right border for single column mobile layout */
#mobile-services-dropdown a:nth-child(odd) {
    border-right: none;
}
/* Remove bottom border from the last item for mobile */
#mobile-services-dropdown a:last-child {
    border-bottom: none;
}
#mobile-services-dropdown a:hover {
    background-color: #E0F2FE; /* Lighter custom blue on hover */
    color: #004AAD; /* Custom blue on hover */
}


/* Service Card Hover Effect */
.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #E5E7EB; /* gray-200 */
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Add transitions for all changing properties */
}

.service-card:hover {
    background-color: #004AAD; /* custom-blue */
    color: white; /* Change text color of the card itself to white on hover */
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Rule for the circular background of the icon/image inside service-card on hover */
.service-card:hover .mb-4.p-3.bg-custom-blue-light.rounded-full {
    background-color: #DC2626; /* Change to custom-red */
    transition: background-color 0.3s ease-in-out;
}

/* Rule for Lucide icons (<i>) inside service-card on hover */
.service-card:hover .service-icon[data-lucide] {
    color: white; /* Change icon color to white on the new red background */
    transition: color 0.3s ease-in-out; /* Ensure smooth color transition for icon */
}

/* Rule for PNG/JPG images (<img>) inside service-card on hover */
/* Removed the filter as it's unreliable for colored placeholder images.
   The image itself will retain its original colors, but its surrounding circle will be red. */
.service-card:hover .service-icon[src$=".png"],
.service-card:hover .service-icon[src$=".jpg"],
.service-card:hover .service-icon[src$=".jpeg"] {
    filter: none; /* Ensure no filter is applied on hover */
    transition: none; /* No transition for filter as it's not changing */
}

/* Default state for all service icons (both Lucide and images) */
.service-card .service-icon {
    color: #004AAD; /* Default color for Lucide icons */
    filter: none; /* Ensure no filter is applied by default to images */
    transition: color 0.3s ease-in-out, filter 0.3s ease-in-out; /* Smooth transition for both */
}


/* Facility Card Hover Effect */
.facility-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #E5E7EB; /* gray-200 */
}

.facility-card:hover {
    background-color: #004AAD; /* custom-blue */
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.facility-card:hover .facility-icon {
    color: white; /* Change icon color on hover */
}

.facility-card .facility-icon {
    color: #004AAD; /* custom-blue */
    transition: color 0.3s ease-in-out;
}

/* Doctor Scroller Specific Styling for larger images and layout */
#doctors {
    background-color: #F8FAFC; /* Light gray background for doctors section */
}

#doctors-scroller .doctor-card {
    flex: 0 0 auto; /* Prevent cards from shrinking */
    width: 320px; /* Fixed width for each card */
    position: relative; /* For absolute positioning of overlay */
    overflow: hidden; /* Hide overflow for rounded corners */
    border-radius: 0.75rem; /* rounded-lg */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

#doctors-scroller .doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

#doctors-scroller .doctor-card img {
    width: 100%; /* Image fills the card width */
    height: 380px; /* Increased height for larger images */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 0.75rem; /* Apply border-radius to image as well */
}

.doctor-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0)); /* Gradient overlay */
    color: white;
    padding: 1.5rem;
    padding-top: 4rem; /* More padding at top to account for gradient start */
    text-align: left;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.doctor-content-overlay h3 {
    font-size: 1.75rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    color: white; /* Ensure text is white on dark overlay */
    margin-bottom: 0.5rem;
}

.doctor-content-overlay p.specialty {
    color: #E0F2FE; /* Light blue for specialty */
    font-weight: 500; /* font-medium */
    margin-bottom: 0.5rem;
}

.doctor-content-overlay p.bio {
    color: #E5E7EB; /* Lighter gray for bio */
    line-height: 1.5;
    font-size: 0.9rem; /* Slightly smaller font for bio */
}


/* Adjust scroller arrows position */
#prev-doctor, #next-doctor {
    top: calc(50% + 20px); /* Adjust based on card height */
    transform: translateY(-50%);
}

@media (max-width: 767px) {
    #doctors-scroller .doctor-card {
        width: 280px; /* Slightly smaller on very small screens */
    }
}

/* Map section styling */
#maps img {
    max-height: 400px; /* Limit height of map image */
}

/* Health Package Card Styling */
.package-card {
    background-color: white;
    padding: 2rem; /* Adjusted padding for better spacing */
    border-radius: 0.75rem; /* rounded-lg */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); /* shadow-xl */
    overflow: hidden; /* Ensures image corners are rounded */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: 1px solid #E5E7EB; /* gray-200 */
}

.package-card:hover {
    transform: translateY(-8px); /* Lift effect on hover */
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.2); /* More pronounced shadow */
}

.package-card img {
    width: 100%;
    height: 250px; /* Increased height for larger images */
    object-fit: cover; /* Cover the area, cropping if necessary */
}

.package-card h3 {
    font-size: 1.75rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    color: #1F2937; /* gray-900 */
}

.package-card p {
    color: #4B5563; /* gray-600 */
    line-height: 1.6;
}

.package-card .book-now-button {
    background-color: #E03030; /* custom-red */
    color: white;
    padding: 0.5rem 1rem; /* Smaller padding for a smaller button */
    border-radius: 0.375rem; /* rounded-md */
    font-weight: 600; /* font-semibold */
    font-size: 0.9rem; /* Smaller font size */
    text-align: center;
    display: block; /* Make it a block button */
    width: auto; /* Allow button to size based on content */
    min-width: 120px; /* Minimum width for consistency */
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.package-card .book-now-button:hover {
    background-color: #C02828; /* darker red on hover */
    transform: scale(1.02); /* Slight scale effect */
}

/* Testimonials Section Styling */
#testimonials {
    background-color: #F0F8FF; /* AliceBlue - a very light blue */
    color: #333; /* Darker text for contrast on light background */
}

#testimonials h2 {
    color: #E03030; /* Changed to custom-red */
}

#testimonials .bg-custom-blue-dark {
    background-color: #004AAD; /* Custom blue for testimonial cards */
    color: white; /* White text on blue cards */
}

#testimonials .bg-custom-blue-dark p {
    color: white; /* Ensure paragraph text is white */
}


/* Why Choose Us Section Styling */
#why-choose-us {
    background-color: #003380; /* Dark blue base */
    /* Re-introducing a subtle pattern, ensuring it's not too strong */
    background-image: linear-gradient(135deg, rgba(255,255,255,0.05) 25%, transparent 25%),
                      linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%);
    background-size: 40px 40px; /* Size of the pattern */
    background-position: 0 0, 20px 20px; /* Offset for a brick-like pattern */
    color: white; /* Ensure all text in this section is white by default */
    position: relative; /* Needed for z-index */
    overflow: hidden; /* Important for background patterns/gradients */
}

#why-choose-us .container {
    position: relative; /* Ensure content is above the background pattern */
    z-index: 2; /* Higher than the background pattern */
    /* Updated for centering and larger width */
    max-width: 1000px; /* Adjust as needed to make it larger */
    margin: 0 auto; /* Center the container */
    display: flex; /* Use flexbox for centering content */
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center items horizontally */
    text-align: center; /* Center text within the container */
}

/* Main heading "Why Choose Us?" */
#why-choose-us h2 {
    color: #E03030; /* Changed to custom-red as requested */
    z-index: 3; /* Ensure this is on top */
    position: relative; /* Needed for z-index to work */
    font-size: 3.5rem; /* Larger font size for prominence */
    margin-bottom: 1.5rem; /* Adjust spacing */
}

#why-choose-us p {
    color: #E5E7EB; /* Lighter gray for general text for subtle contrast */
    z-index: 3; /* Ensure this is on top */
    position: relative; /* Needed for z-index to work */
    font-size: 1.125rem; /* Slightly larger paragraph text */
    line-height: 1.8; /* Improved line height for readability */
    max-width: 800px; /* Constrain width for better readability */
    margin-left: auto;
    margin-right: auto;
}

/* Styles for the stat boxes within #why-choose-us */
#why-choose-us .grid {
    width: 100%; /* Ensure grid takes full width of its container */
    max-width: 900px; /* Limit max width of the grid itself */
    margin-top: 2rem; /* Space above the stats grid */
}

#why-choose-us .grid > div { /* Target the direct children of the grid, which are the stat boxes */
    background-color: white; /* White background for stat boxes */
    border: none; /* Remove any existing borders */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* More pronounced shadow */
    border-radius: 0.75rem; /* Rounded corners */
    padding: 2rem; /* Adjust padding for better spacing */
    z-index: 3; /* Ensure these are on top */
    position: relative; /* Needed for z-index to work */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Add transition for hover */
}

#why-choose-us .grid > div:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

#why-choose-us .grid > div h3 {
    color: #004AAD; /* Numbers should be custom blue */
    font-size: 3rem; /* Even larger for impact */
    font-weight: 800; /* Extra bold */
    margin-bottom: 0.75rem; /* More space below number */
}

#why-choose-us .grid > div p {
    color: #4B5563; /* Description text should be gray-600 */
    font-size: 1.125rem; /* text-lg for descriptions */
    line-height: 1.5; /* Adjust line height for readability */
}

/* Media query for smaller screens (less than 640px, Tailwind's 'sm' breakpoint) */
@media (max-width: 639px) {
    #why-choose-us .grid > div {
        padding: 1.5rem; /* Slightly reduced padding for very small screens */
    }
    #why-choose-us .grid > div h3 {
        font-size: 2.25rem; /* text-4xl equivalent on mobile */
        margin-bottom: 0.5rem;
    }
    #why-choose-us .grid > div p {
        font-size: 1rem; /* text-base equivalent on mobile */
    }
    #why-choose-us h2 {
        font-size: 2.5rem; /* Smaller main heading on mobile */
    }
    #why-choose-us p {
        font-size: 1rem; /* Smaller paragraph text on mobile */
    }
}
/* Floating WhatsApp Button Styling */
.whatsapp-float {
    position: fixed;
    bottom: 20px; /* Distance from bottom */
    right: 20px; /* Distance from right */
    background-color: #25D366; /* WhatsApp green */
    color: white;
    border-radius: 50%; /* Make it round */
    width: 60px; /* Size of the button */
    height: 60px; /* Size of the button */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem; /* Icon size */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); /* Shadow for depth */
    z-index: 1000; /* Ensure it's above other content */
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.whatsapp-float:hover {
    background-color: #1DA851; /* Darker green on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Ensure the icon inside the button is styled correctly */
.whatsapp-float i[data-lucide="message-circle"] {
    fill: white;
    stroke: white;
    width: 32px; /* Adjust icon size as needed */
    height: 32px; /* Adjust icon size as needed */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    .whatsapp-float i[data-lucide="message-circle"] {
        width: 28px;
        height: 28px;
    }
}
