:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --font-family-base: "Outfit", sans-serif;
    --transition-base: all 0.3s ease;
    --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 24px rgba(0, 0, 0, 0.12);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    background-color: #fcfcfc;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Navbar Enhancements */
.navbar {
    transition: var(--transition-base);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition-base);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.top-bar a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.375rem;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.rounded-pill {
    border-radius: 50rem !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: var(--transition-base);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    background: white;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 202, 240, 0.1) 100%);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 15px;
    transition: var(--transition-base);
}

.feature-card:hover .icon-box {
    background: var(--primary-color);
    color: white;
    transform: rotate(360deg) scale(1.1);
}

/* Doctor Profile */
.doctor-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    padding: 30px;
    text-align: center;
    border-top: 5px solid var(--primary-color);
    transition: var(--transition-base);
}

.doctor-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.doctor-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 5px solid white;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.doctor-card:hover .doctor-img {
    transform: scale(1.05);
}

/* Booking Tabs */
.nav-pills .nav-link {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Forms */
.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border: 2px solid var(--primary-color) !important;
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Gallery */
.gallery-img {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    border-radius: 0.75rem;
}

.gallery-img:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

/* Steps */
.step-card {
    transition: var(--transition-base);
    padding: 1.5rem;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-card:hover .step-icon {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.1);
}

.step-icon {
    transition: var(--transition-base);
}

.step-number {
    transition: var(--transition-base);
}

.step-card:hover .step-number {
    transform: scale(1.15);
}

/* Appointment Section */
.appointment-section {
    margin-top: 0; /* Adjusted to prevent overlap with ticker */
    z-index: 10;
    position: relative;
    margin-bottom: 2rem;
}

.appointment-card {
    border-top: 5px solid var(--primary-color);
    transition: var(--transition-base);
}

.appointment-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.booking-marquee {
    white-space: nowrap;
    overflow: hidden;
}

.animate-marquee {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

footer a {
    transition: var(--transition-base);
}

footer a:hover {
    color: var(--accent-color) !important;
    transform: translateX(5px);
    display: inline-block;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition-base);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px) !important;
}

/* Stats Section */
.bg-primary.text-white {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%) !important;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.25rem;
}

/* Responsive Breakpoints */

/* Large Tablets and Small Desktops (768px - 991px) */
@media (max-width: 991px) {
    .hero-section {
        height: 500px;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .appointment-section {
        margin-top: -60px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Tablets (576px - 767px) */
@media (max-width: 767px) {
    .hero-section {
        height: 450px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .appointment-section {
        margin-top: -40px;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .top-bar {
        font-size: 0.75rem;
    }

    .top-bar .d-none.d-md-block {
        display: none !important;
    }

    footer .col-md-4 {
        margin-bottom: 2rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    section {
        padding: 3rem 0 !important;
    }
}

/* Mobile Devices (< 576px) */
@media (max-width: 575px) {
    .hero-section {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content .lead {
        font-size: 0.95rem;
    }

    .appointment-section {
        margin-top: -20px;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.95rem;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .nav-link {
        padding: 0.5rem 0 !important;
    }

    .top-bar {
        font-size: 0.7rem;
        padding: 0.5rem 0;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .feature-card {
        padding: 1.5rem !important;
    }

    .icon-box {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .doctor-img {
        width: 120px;
        height: 120px;
    }

    .gallery-img {
        height: 200px !important;
    }

    .stats-section h2 {
        font-size: 2rem;
    }

    footer {
        text-align: center;
    }

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    h4 {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    section {
        padding: 2.5rem 0 !important;
    }

    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .mt-5 {
        margin-top: 2rem !important;
    }

    /* Better mobile menu */
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav {
        gap: 0.5rem;
    }
}

/* Extra Small Devices (< 400px) */
@media (max-width: 399px) {
    .hero-section {
        height: 350px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content .lead {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .display-4 {
        font-size: 1.5rem;
    }

    .top-bar {
        font-size: 0.65rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    section {
        padding: 2rem 0 !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .top-bar,
    footer,
    .btn {
        display: none;
    }

    body {
        background: white;
    }

    .hero-section {
        height: auto;
        background: none !important;
    }

    .hero-overlay {
        display: none;
    }
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
