/* ==========================================
   Royal Hospital - Modern Custom Styles
   Using Pastel Color Palette
   ========================================== */

:root {
    /* Modern Professional Light Color Palette */
    --primary: #0EA5E9;        /* Sky Blue */
    --primary-dark: #0284C7;
    --primary-light: #BAE6FD;
    --secondary: #8B5CF6;       /* Purple */
    --secondary-dark: #7C3AED;
    --secondary-light: #DDD6FE;
    --accent: #EC4899;          /* Pink */
    --accent-light: #FBCFE8;
    --success: #10B981;         /* Emerald Green */
    --info: #3B82F6;            /* Blue */
    --warning: #F59E0B;         /* Amber */
    --danger: #EF4444;          /* Red */
    
    /* Light Gradients */
    --gradient-primary: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 100%);
    --gradient-soft: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
    --gradient-hero: linear-gradient(135deg, #F0F9FF 0%, #FAF5FF 100%);
    --gradient-card: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    --gradient-stroke: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 100%);
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --light: #F8FAFC;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --dark: #0F172A;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --section-padding: 100px;
    
    /* Border Radius */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================
   Global Styles
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-700);
    background: #FFFFFF;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

.display-1, .display-2, .display-3, .display-4, .display-5 {
    font-family: var(--font-display);
}

p {
    margin-bottom: 1rem;
}

a {
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
}

section {
    position: relative;
}

.py-lg-6 {
    padding-top: var(--section-padding) !important;
    padding-bottom: var(--section-padding) !important;
}

/* ==========================================
   Custom Bootstrap Color Overrides
   ========================================== */

.text-primary {
    color: var(--primary-dark) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-primary-subtle {
    background-color: var(--primary-light) !important;
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: var(--white);
    font-weight: 600;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
    color: var(--white);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
    z-index: -1;
}

.btn-outline-primary:hover::before {
    width: 100%;
}

.btn-outline-primary:hover {
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.badge {
    font-weight: 500;
    font-size: 0.875rem;
}

/* ==========================================
   Navigation
   ========================================== */

.navbar {
    padding: 1rem 0;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(209, 213, 219, 0.8);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gray-900);
    transition: var(--transition-base);
}

.navbar-brand img {
    filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.2))
            drop-shadow(0 2px 4px rgba(139, 92, 246, 0.15));
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.navbar-brand:hover img {
    filter: drop-shadow(0 8px 16px rgba(14, 165, 233, 0.3))
            drop-shadow(0 4px 8px rgba(139, 92, 246, 0.25))
            drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transform: translateY(-2px) perspective(1000px) rotateX(5deg);
}

.navbar-brand:hover {
    color: var(--primary);
}

.nav-link {
    font-weight: 500;
    color: var(--gray-600);
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ==========================================
   Hero Section
   ========================================== */

.hero-section {
    padding-top: 80px;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
    animation: pulse 5s ease-in-out infinite;
}

.hero-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gray-900);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    transition: var(--transition-slow);
    border: 2px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 70px rgba(14, 165, 233, 0.2);
}

.floating-card {
    animation: floating 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gray-200);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
}

/* ==========================================
   Info Cards
   ========================================== */

.info-card {
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.icon-circle {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ==========================================
   Service Cards
   ========================================== */

.service-card {
    transition: var(--transition-base);
    border: 1px solid var(--gray-200);
    background: var(--white);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.15);
    border-color: var(--primary-light);
}

.service-image {
    height: 250px;
    overflow: hidden;
}

.service-image img {
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.icon-box {
    transition: var(--transition-base);
}

.service-card:hover .icon-box {
    transform: scale(1.1);
}

/* ==========================================
   Why Choose Us Section
   ========================================== */

.why-card {
    transition: var(--transition-base);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   Team Section
   ========================================== */

.team-card {
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.team-avatar {
    width: 120px;
    height: 120px;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    transition: var(--transition-base);
}

.team-card:hover .avatar-placeholder {
    transform: scale(1.1);
}

/* ==========================================
   Testimonial Cards
   ========================================== */

.testimonial-card {
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.avatar-sm {
    width: 50px;
    height: 50px;
}

/* ==========================================
   Blog Cards
   ========================================== */

.blog-card {
    transition: var(--transition-base);
    border: 1px solid var(--gray-200);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.blog-image {
    height: 220px;
    overflow: hidden;
}

.blog-image img {
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

/* ==========================================
   Contact Section
   ========================================== */

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1.25rem;
    transition: var(--transition-base);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(168, 218, 220, 0.25);
}

.contact-form textarea.form-control {
    border-radius: var(--border-radius-md);
}

.social-icon {
    width: 45px;
    height: 45px;
    transition: var(--transition-base);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   Footer
   ========================================== */

footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

footer img {
    filter: drop-shadow(0 6px 12px rgba(14, 165, 233, 0.3))
            drop-shadow(0 3px 6px rgba(139, 92, 246, 0.2))
            drop-shadow(0 1px 3px rgba(255, 255, 255, 0.1));
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

footer img:hover {
    filter: drop-shadow(0 10px 20px rgba(14, 165, 233, 0.4))
            drop-shadow(0 5px 10px rgba(139, 92, 246, 0.3))
            drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2));
    transform: translateY(-3px) scale(1.05);
}

.social-icon-footer {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.social-icon-footer:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--primary) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

footer a:hover {
    color: var(--primary) !important;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ==========================================
   Back to Top Button
   ========================================== */

#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    z-index: 1000;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

#backToTop:hover {
    transform: translateY(-5px);
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.rounded-pill {
    border-radius: 50rem !important;
}

/* ==========================================
   Utilities
   ========================================== */

.rounded-4 {
    border-radius: var(--border-radius-xl) !important;
}

.rounded-3 {
    border-radius: var(--border-radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: var(--transition-base);
    cursor: pointer;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.15);
}

.hover-primary {
    transition: var(--transition-fast);
}

.hover-primary:hover {
    color: var(--primary) !important;
}

.scroll-indicator {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.animate-in {
    animation: fadeIn 0.8s ease-out;
}

/* ==========================================
   Background Colors
   ========================================== */

.bg-success-subtle {
    background-color: #d1f2eb !important;
}

.bg-info-subtle {
    background-color: #f8d7da !important;
}

.bg-warning-subtle {
    background-color: #fff3cd !important;
}

.bg-danger-subtle {
    background-color: #f8d7da !important;
}

/* Text Colors */
.text-success {
    color: #0d9488 !important;
}

.text-info {
    color: #3b82f6 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-danger {
    color: #ef4444 !important;
}

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
}

.glass-dark {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
}

/* Neon Glow Animation - Removed for light theme */

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 20s linear infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* SVG Animations */
@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.draw-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease forwards;
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease;
}

/* Slide In */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 991.98px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .py-lg-6 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    :root {
        --section-padding: 60px;
    }
    
    .floating-card {
        position: relative !important;
        margin: 20px 0 !important;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .service-image,
    .blog-image {
        height: 200px;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding-top: 80px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    #backToTop {
        display: none;
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ==========================================
   Loading Animation
   ========================================== */

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    .navbar,
    #backToTop,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}
