/* Custom CSS for CMH Website */

:root {
    --primary: #1e3a8a;
    --secondary: #059669;
    --primary-light: #3b82f6;
    --secondary-light: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Forms */
input, select, textarea {
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Doctor Cards */
.doctor-card {
    transition: all 0.3s ease;
}

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

/* Blog Cards */
.article-card {
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

/* Filter Buttons */
.filter-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
}

/* Sticky Navigation */
nav {
    transition: all 0.3s ease;
}

/* Hero Section Patterns */
.absolute.inset-0.opacity-10::before {
    content: '';
}

/* Mobile Menu */
.hero-slider {
    position: relative;
    background: #dfeafc;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.clinic-gallery-slider {
    position: relative;
}

.clinic-gallery-track {
    display: flex;
    width: 100%;
}

.clinic-slide {
    display: block;
}

.clinic-slide div {
    transition: transform 0.5s ease;
}

.clinic-slide div:hover {
    transform: scale(1.04);
}

#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

/* Floating Buttons */
#floating-buttons {
    z-index: 40;
}

#floating-buttons button,
#floating-buttons a {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#floating-buttons button:hover,
#floating-buttons a:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Success Message */
.success-message {
    animation: slideUp 0.5s ease-out;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a2e6b;
}

/* Step Indicator */
.step-line {
    transition: all 0.3s ease;
}

.step-line.active {
    background-color: var(--primary);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(30, 58, 138, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--secondary);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hidden\@mobile {
        display: none;
    }

    .container-safe {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }

    .no-print {
        display: none;
    }

    a {
        text-decoration: underline;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }

    body {
        background-color: #111827;
        color: #f3f4f6;
    }

    .bg-white {
        background-color: #1f2937;
    }

    .text-gray-700 {
        color: #d1d5db;
    }

    .text-gray-600 {
        color: #9ca3af;
    }
}

/* Utility Classes */
.container-safe {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Button Hover Effects */
.btn-hover {
    position: relative;
    overflow: hidden;
}

.btn-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-hover:hover::after {
    width: 300px;
    height: 300px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shadow Effects */
.shadow-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-medical {
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.15);
}

/* Link Styles */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Focus States for Accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Transform Classes */
.translate-hover-x {
    transition: transform 0.3s ease;
}

.translate-hover-x:hover {
    transform: translateX(4px);
}

.translate-hover-y {
    transition: transform 0.3s ease;
}

.translate-hover-y:hover {
    transform: translateY(-4px);
}

/* Glow Effect */
.glow-effect {
    box-shadow: 0 0 20px rgba(30, 58, 138, 0.3);
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(30, 58, 138, 0.5);
}
