/* ===== RESET & VARIABLES ===== */
:root {
    --primary: #2a9d8f;
    --primary-dark: #247a6f;
    --primary-light: #e8f5f3;
    --secondary: #264653;
    --secondary-light: #3a5a6e;
    --accent: #e76f51;
    --accent-light: #f8e1da;
    --text-dark: #1e293b;
    --text-body: #475569;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-soft: #f1f5f9;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(42, 157, 143, 0.1);
    --shadow-lg: 0 20px 40px rgba(38, 70, 83, 0.12);
    --gradient-primary: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
    --gradient-accent: linear-gradient(135deg, #e76f51 0%, #f4a261 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-light);
    color: var(--text-body);
    line-height: 1.6;
}

/* ===== CONTAINER & GRID ===== */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
}

[class*="col-"] {
    padding: 15px;
    flex: 1;
}

.col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-12 { flex: 0 0 100%; max-width: 100%; }

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    background: var(--bg-white);
}


.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    color: var(--secondary);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed !important;
    width: 100%;
    top: 0;
    z-index: 9999;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    display: none;
    min-width: 180px;
    border-radius: 6px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-dark);
}

.dropdown-item:hover {
    background: var(--bg-soft);
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    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.8s ease, height 0.8s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(42,157,143,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-outline:hover {
    background: var(--bg-white);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 1.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(38, 70, 83, 0.85) 0%, rgba(42, 157, 143, 0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.carousel-content {
    max-width: 800px;
    padding: 0 20px;
    text-align: center;
    color: var(--bg-white);
}

.carousel-tag {
    display: inline-block;
    background: rgba(42, 157, 143, 0.9);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.carousel-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.carousel-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
}

.carousel-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(5px);
}

.carousel-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev { left: 30px; }
.carousel-arrow.next { right: 30px; }

/* ===== STATS FLIP CARDS ===== */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.flip-card {
    perspective: 1200px;
    cursor: pointer;
    height: 200px;
    width: 100%;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
}

.flip-card:hover .flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    box-shadow: var(--shadow-lg);
}

.flip-front {
    background: var(--bg-white);
    border: 1px solid rgba(42, 157, 143, 0.15);
    gap: 20px;
}

.flip-back {
    background: var(--gradient-primary);
    color: var(--bg-white);
    transform: rotateY(180deg);
    text-align: center;
}

.flip-back p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 200px;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(42, 157, 143, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary);
    border: 2px solid rgba(42, 157, 143, 0.2);
    transition: all 0.3s ease;
}

.flip-card:hover .icon-box {
    background: var(--primary);
    color: var(--bg-white);
    transform: scale(1.1) rotate(5deg);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: var(--secondary);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

/* ===== HOSPITAL SECTION ===== */
.hospital-section {
    max-width: 1300px;
    width: 90%;
    margin: 30px auto;
    padding: 60px 50px;
    background: var(--bg-white);
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.hospital-subtitle {
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.hospital-subtitle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.hospital-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 40px;
    line-height: 1.2;
}

.hospital-title span {
    color: var(--primary);
    display: block;
    font-size: 42px;
    margin-top: 5px;
}

/* Accordion */
.hospital-accordion .accordion-item {
    border: 1px solid rgba(42, 157, 143, 0.15);
    margin-bottom: 15px;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hospital-accordion .accordion-item.active {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(42, 157, 143, 0.15);
}

.hospital-accordion .accordion-button {
    width: 100%;
    padding: 22px 25px;
    background: var(--bg-white);
    border: none;
    text-align: left;
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hospital-accordion .accordion-button::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.hospital-accordion .accordion-item.active .accordion-button::after {
    transform: rotate(180deg);
}

.hospital-accordion .accordion-item.active .accordion-button {
    background: var(--gradient-primary);
    color: var(--bg-white);
}

.hospital-accordion .accordion-item.active .accordion-button::after {
    color: var(--bg-white);
}

.hospital-accordion .accordion-body {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    color: var(--text-body);
    line-height: 1.8;
}

.hospital-accordion .accordion-item.active .accordion-body {
    padding: 0 25px 25px 25px;
    max-height: 200px;
}

.hospital-image {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hospital-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid rgba(42, 157, 143, 0.3);
    border-radius: 20px;
    z-index: 1;
    pointer-events: none;
}

.hospital-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hospital-image:hover img {
    transform: scale(1.05);
}

/* ===== DEPARTMENTS SECTION (COMBINED) ===== */
.departments {
    padding: 90px 8%;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.departments-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
    overflow: hidden;
    position: relative;
}

.departments-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(42, 157, 143, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatSlow 20s ease-in-out infinite;
    z-index: 1;
}

.departments-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(231, 111, 81, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatSlow 25s ease-in-out infinite reverse;
    z-index: 1;
}

.departments-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--bg-white);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.departments-image {
    flex: 1;
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.departments-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.2), rgba(38, 70, 83, 0.3));
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.departments-image:hover::before {
    opacity: 1;
}

.departments-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.departments-image:hover img {
    transform: scale(1.1) rotate(2deg);
}

.departments-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
    z-index: 3;
    pointer-events: none;
}

.departments-image:hover::after {
    left: 150%;
}

.departments-content {
    flex: 1;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

.subtitle {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 8px 25px;
    border-radius: 50px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.subtitle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scanLine 3s ease-in-out infinite;
}

.departments-content h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 1.0s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.departments-content p {
    font-size: 18px;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 90%;
    animation: fadeInUp 1s ease 1.2s forwards;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    padding-left: 20px;
    border-left: 3px solid transparent;
    transition: border-color 0.5s ease, padding-left 0.5s ease;
}

.departments-content p:hover {
    border-left-color: var(--primary);
    padding-left: 25px;
}

.dept-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid transparent;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
    animation: fadeInUp 1s ease 1.4s forwards, gentlePulse 3s ease-in-out 2.5s infinite;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: var(--shadow-md);
}

.dept-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.8s ease, height 0.8s ease;
    z-index: -1;
}

.dept-btn:hover {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.dept-btn:hover::before {
    width: 300px;
    height: 300px;
}

.dept-btn:hover i,
.dept-btn:hover svg {
    transform: translateX(8px) rotate(360deg);
}

/* Department Grid Cards */
.department-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    perspective: 1200px;
}

.department-card {
    background: var(--bg-white);
    padding: 45px 30px 70px;
    text-align: center;
    border-radius: 25px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(42, 157, 143, 0.1);
    animation: fadeInUp 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    cursor: pointer;
}

.department-card:nth-child(1) { animation-delay: 0.2s; }
.department-card:nth-child(2) { animation-delay: 0.5s; }
.department-card:nth-child(3) { animation-delay: 0.8s; }
.department-card:nth-child(4) { animation-delay: 1.1s; }

.department-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 30px 50px rgba(42, 157, 143, 0.25);
    border-color: var(--primary);
}

.department-card h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--secondary);
    transition: all 0.6s ease;
    position: relative;
    display: inline-block;
}

.department-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.department-card:hover h3::after {
    width: 60px;
}

.department-card:hover h3 {
    color: var(--primary);
}

.department-card p {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 25px;
    transition: all 0.6s ease;
}

.department-card a {
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    color: var(--secondary);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
    padding: 5px 0;
    margin-bottom:45px;
}

.department-card a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.department-card a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.department-card a:hover::before {
    width: 100%;
}

.department-card .icon-box {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: rgba(42, 157, 143, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(42, 157, 143, 0.2);
    animation: slowPulse 4s ease-in-out infinite;
}

.department-card:hover .icon-box {
    background: var(--primary);
    color: var(--bg-white);
    transform: translateX(-50%) scale(1.15) rotate(8deg);
    border-color: var(--primary);
    animation: none;
}

/* ===== TEAM SECTION ===== */
.team-section {
    margin-right: 0px !important;
    margin-left: 0px !important;
    max-width: 100%;
    width: 100%;
    /* margin: 0 auto; */
    padding: 40px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.section-subtitle {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
    background: rgba(42, 157, 143, 0.1);
    padding: 8px 25px;
    border-radius: 50px;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.8s ease;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.section-title span {
    color: var(--primary);
    position: relative;
}

.section-description {
    color: var(--text-body);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.team-carousel-container {
    position: relative;
    /* padding: 20px 10px 60px; */
    overflow: hidden;
    width: 98%;
}

.team-carousel {
    display: flex;
    gap: 30px;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    cursor: grab;
}

.team-carousel.dragging {
    cursor: grabbing;
    transition: none;
}

.team-card {
    /* flex:0 0 400px !important; */
    flex: 0 0 calc(33.333% - 20px);
    min-width: 280px;
    background: var(--bg-white);
    border-radius: 30px;
    padding: 30px 20px 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(42, 157, 143, 0.15);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    perspective: 1200px;
    animation: fadeInScale 1.5s ease forwards;
    opacity: 0;
}

.team-card:nth-child(1) { animation-delay: 0.2s; }
.team-card:nth-child(2) { animation-delay: 0.4s; }
.team-card:nth-child(3) { animation-delay: 0.6s; }
.team-card:nth-child(4) { animation-delay: 0.8s; }
.team-card:nth-child(5) { animation-delay: 1.0s; }
.team-card:nth-child(6) { animation-delay: 1.2s; }

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.team-card.flipped .card-inner {
    transform: rotateY(180deg);
}
@mobile(max-width:786px)
{
.team-card{
        flex: 0 0 400px !important;
}
}

.card-front, .card-back {
    position: relative;
    width: 100%;
    backface-visibility: hidden;
    background: var(--bg-white);
    border-radius: 30px;
}

.card-front { transform: rotateY(0deg); }
.card-back {
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: var(--gradient-primary);
    color: var(--bg-white);
    border-radius: 30px;
}

.card-back h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--bg-white);
}

.card-back p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    opacity: 0.95;
}

.member-image {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    padding: 5px;
    background: var(--bg-white);
    transition: all 0.5s ease;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.team-card:hover .member-image {
    border-color: var(--secondary);
    transform: scale(1.05);
}

.member-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
}

.member-role {
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.carousel-controls .carousel-arrow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid rgba(42, 157, 143, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.5s ease;
    position: static;
    transform: none;
}

.carousel-controls .carousel-arrow:hover {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 15px;
}

.carousel-dots .dot {
    width: 14px;
    height: 14px;
    background: rgba(42, 157, 143, 0.3);
}

.carousel-dots .dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* ===== PATIENT RESOURCES SECTION ===== */
.resources-section {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 50px;
    padding: 70px 50px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.resources-section::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(42, 157, 143, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.resources-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(38, 70, 83, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.how-it-works {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 40px;
    padding: 50px;
    margin-bottom: 70px;
    border: 1px solid rgba(42, 157, 143, 0.15);
    animation: fadeInUp 1.5s ease 0.2s forwards;
    opacity: 0;
}

.how-it-works-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.how-icon {
    width: 60px;
    height: 60px;
    margin-left: 9px;
    background: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--bg-white);
    transform: rotate(-5deg);
    transition: all 0.5s ease;
}

.how-it-works:hover .how-icon {
    transform: rotate(0deg) scale(1.05);
}

.how-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
}

.how-title span {
    color: var(--primary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
    transition: all 0.6s ease;
}

.step-item:hover .step-number {
    transform: scale(1.15) rotate(360deg);
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
}

.step-desc {
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.6;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.resource-card {
    background: var(--bg-white);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(42, 157, 143, 0.15);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.5s ease forwards;
    opacity: 0;
}

.resource-card:nth-child(1) { animation-delay: 0.3s; }
.resource-card:nth-child(2) { animation-delay: 0.5s; }
.resource-card:nth-child(3) { animation-delay: 0.7s; }

.resource-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.resource-icon {
    width: 80px;
    height: 80px;
    background: rgba(42, 157, 143, 0.1);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: var(--primary);
    margin-bottom: 25px;
    transition: all 0.6s ease;
}

.resource-card:hover .resource-icon {
    background: var(--primary);
    color: var(--bg-white);
    transform: scale(1.1) rotate(5deg);
}

.resource-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.resource-card p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 25px;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
}

.resource-link:hover {
    color: var(--secondary);
}

.resource-link:hover i {
    transform: translateX(8px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slowPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 30px) scale(1.05); }
    66% { transform: translate(30px, -30px) scale(0.95); }
}

@keyframes slideInLeft {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scanLine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 5px 15px rgba(42, 157, 143, 0.3); }
    50% { box-shadow: 0 10px 30px rgba(42, 157, 143, 0.5); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .department-grid { grid-template-columns: repeat(3, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .resources-grid { grid-template-columns: repeat(2, 1fr); }
    .container { max-width: 1100px; }
}

@media (max-width: 992px) {
    .col-lg-4 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-6 { flex: 0 0 100%; max-width: 100%; }
    
    .carousel-title { font-size: 42px; }
    .hospital-title { font-size: 42px; }
    .hospital-title span { font-size: 36px; }
    .section-title { font-size: 36px; }
    .departments-content h2 { font-size: 36px; }
    
    .navbar-nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        display: none;
        padding: 20px;
        box-shadow: var(--shadow-sm);
    }
    
    .navbar-nav.active { display: flex; }
    .navbar-toggler { display: block; }
    
    .row { flex-direction: column-reverse; }
    
    .departments-wrapper {
        flex-direction: column;
        padding: 30px;
    }
    
    .departments-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .departments-content {
        text-align: center;
    }
    
    .departments-content p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .hero-carousel { min-height: 450px; }
    .carousel-title { font-size: 32px; }
    .carousel-description { font-size: 15px; }
    
    .stats-section { padding: 50px 0; }
    .flip-card { height: 180px; }
    
    .hospital-section { padding: 30px 20px; }
    .hospital-title { 
        font-size: 32px; 
    }
    .hospital-title span { font-size: 28px; }
    
    .departments { padding: 60px 20px; }
    .department-grid { grid-template-columns: 1fr; }
    .departments-content h2 { font-size: 32px; }
    .departments-content p { font-size: 16px; }
    .subtitle { font-size: 14px; padding: 6px 20px; }
    .dept-btn { padding: 14px 30px; font-size: 15px; }
    
    .resources-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    
    .section-title { font-size: 30px; }
    .section-subtitle { font-size: 16px; }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .carousel-arrow.prev { left: 15px; }
    .carousel-arrow.next { right: 15px; }
    
    .resources-section { padding: 40px 20px; }
    .how-it-works { padding: 30px 20px; }
    .row { flex-direction: column-reverse; }
    .step-item:not(:last-child)::after { display: none; }
}

@media (max-width: 576px) {
    .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
    
    .carousel-title { font-size: 26px; }
    .carousel-buttons { gap: 15px; }
    
    .hospital-title { 
        font-size: 28px; 
    }
    .hospital-title span { font-size: 24px; }
    .hospital-accordion .accordion-button { padding: 18px 20px; font-size: 18px; }
    
    .departments-content h2 { font-size: 28px; }
    .departments-content p { 
        font-size: 15px; 
        padding-left: 15px;
        max-width: 100%;
    }
    .departments-content h2 br { display: none; }
    .subtitle { font-size: 13px; padding: 5px 18px; letter-spacing: 2px; }
    .dept-btn { 
        padding: 12px 25px; 
        font-size: 14px; 
        width: 100%; 
        justify-content: center; 
    }
    .departments-wrapper { padding: 20px; gap: 20px; }
    .departments-section { padding: 40px 0; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero-carousel { min-height: 350px; }
    .carousel-title { font-size: 28px; }
}

/* ===== UTILITIES ===== */
img { max-width: 100%; height: auto; }

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* ===== TOUCH DEVICE OPTIMIZATION ===== */
@media (hover: none) and (pointer: coarse) {
    .departments-image:hover img { transform: none; }
    .departments-image:hover::before,
    .departments-image:hover::after { display: none; }
    .dept-btn:active {
        transform: scale(0.95);
        background: var(--primary-dark);
    }
    .departments-content p:hover {
        border-left-color: transparent;
        padding-left: 20px;
    }
}

/* ===== REDUCED MOTION PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
    .departments-image,
    .departments-content,
    .subtitle,
    .departments-content h2,
    .departments-content p,
    .dept-btn,
    .departments-section::before,
    .departments-section::after,
    .how-icon,
    .step-number,
    .resource-card,
    .department-card,
    .team-card {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
/* ===== TEAM CAROUSEL MOBILE FIX ===== */
.team-carousel-container {
    padding-left: 0;
    padding-right: 0;
    transition: padding 0.3s ease;
}

/* Mobile responsive padding */
@media screen and (max-width: 768px) {
    .team-carousel-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .team-carousel {
        gap: 15px;
    }
    
    .team-card {
        flex: 0 0 calc(85% - 10px);
        min-width: 260px;
    }
}

@media screen and (max-width: 576px) {
    .team-carousel-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .team-card {
        flex: 0 0 calc(90% - 8px);
        min-width: 240px;
    }
}

@media screen and (max-width: 400px) {
    .team-carousel-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .team-card {
        flex: 0 0 calc(95% - 5px);
        min-width: 220px;
    }
}

/* Fix for the carousel controls on mobile */
@media screen and (max-width: 768px) {
    .carousel-controls {
        margin-top: 30px;
        padding: 0 10px;
    }
    
    .carousel-dots .dot {
        width: 10px;
        height: 10px;
    }
}

/* Ensure the team section doesn't overflow */
.team-section {
    width: 100%;
    overflow: hidden;
}

.team-carousel {
    scroll-padding: 0 20px;
}

/* Smooth scrolling for iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .team-carousel {
        -webkit-overflow-scrolling: touch;
        scroll-padding: 0 20px;
    }
}

