/* css/style.css */
:root {
    --primary: #0d47a1;
    --primary-light: #5472d3;
    --primary-dark: #002171;
    --secondary: #00838f;
    --secondary-light: #4fb3bf;
    --secondary-dark: #005662;
    --accent: #00bcd4;
    --white: #ffffff;
    --light: #f8f9fa;
    --gray: #6c757d;
    --dark: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader .loader {
    text-align: center;
}

.heart-rate {
    font-size: 3rem;
    color: var(--primary);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.preloader p {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 500;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Emergency Popup */
.emergency-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateX(600px);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 350px;
}

.emergency-popup.show {
    transform: translateX(0);
}

.popup-content {
    padding: 20px;
    position: relative;
}

.popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.popup-header i {
    font-size: 1.5rem;
    color: var(--danger);
    margin-right: 10px;
}

.popup-header h3 {
    flex: 1;
    margin: 0;
    color: var(--dark);
}

.close-popup {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
}

.close-popup:hover {
    color: var(--danger);
}

.emergency-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.emergency-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.emergency-btn i {
    margin-right: 8px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    height: 7vh;
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-emergency {
    background: var(--danger);
    color: var(--white);
}

.btn-emergency:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('./../images/hospital_front_view.jpeg') center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(116, 146, 190, 0.5) 0%, rgba(0, 131, 143, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem 0 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(45deg, var(--accent), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.hero-image {
    position: relative;
}

.image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 15px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.floating-card h4 {
    margin: 0;
    font-size: 0.9rem;
}

.floating-card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray);
}

.emergency-card {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.doctor-card {
    bottom: 20px;
    right: 20px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Features */
.features {
    background: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* Services Preview */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.service-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.service-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(3px);
}

.text-center {
    text-align: center;
}

/* Emergency Banner */
.emergency-banner {
    background: linear-gradient(135deg, var(--danger) 0%, #c82333 100%);
    color: var(--white);
    padding: 3rem 0;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.banner-text h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.banner-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.banner-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Testimonials - FIXED VERSION */
/* Testimonials - PROPERLY FIXED VERSION */
.testimonials {
    background: var(--light);
    padding: 4rem 0;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    width: 100%;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 1.5rem;
    padding: 0 1rem;
}

.testimonial-card {
    flex: 0 0 calc(33.333% - 1rem);
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stars {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.patient-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.patient-info h4 {
    margin: 0;
    color: var(--dark);
    font-size: 1rem;
}

.patient-info span {
    color: var(--gray);
    font-size: 0.8rem;
}

/* Manual slider controls */
.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.slider-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

/* Dot indicators */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* FIXED RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .testimonial-card {
        flex: 0 0 calc(50% - 1rem);
        min-height: 280px;
    }
    
    .testimonial-content p {
        -webkit-line-clamp: 5;
    }
}

@media (max-width: 768px) {
    .testimonials {
        padding: 3rem 0;
    }
    
    .testimonial-track {
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .testimonial-card {
        flex: 0 0 calc(100% - 1rem);
        min-height: 250px;
        padding: 1.5rem;
    }
    
    .testimonial-content p {
        -webkit-line-clamp: 4;
        font-size: 0.9rem;
    }
    
    .patient-info {
        gap: 0.75rem;
    }
    
    .patient-info img {
        width: 40px;
        height: 40px;
    }
    
    .patient-info h4 {
        font-size: 0.9rem;
    }
    
    .patient-info span {
        font-size: 0.75rem;
    }
    
    .slider-controls {
        margin-top: 1.5rem;
    }
    
    .slider-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonials {
        padding: 2rem 0;
    }
    
    .testimonial-card {
        padding: 1.25rem;
        min-height: 220px;
    }
    
    .testimonial-content p {
        -webkit-line-clamp: 3;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .stars {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .patient-info {
        gap: 0.5rem;
    }
    
    .patient-info img {
        width: 35px;
        height: 35px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
}

/* Ensure proper card sizing on all screens */
@media (min-width: 1400px) {
    .testimonial-card {
        flex: 0 0 calc(25% - 1rem);
    }
}

/* CTA Section */
.cta-section {
    background: var(--gradient);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 3.5vh;
    margin-right: 10px;
    color: var(--accent);
}

.footer-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--accent);
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--accent);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleUp 0.6s ease forwards;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideLeft 0.6s ease forwards;
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideRight 0.6s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Delays */
.animate-fade-up:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-up:nth-child(2) { animation-delay: 0.3s; }
.animate-fade-up:nth-child(3) { animation-delay: 0.5s; }
.animate-fade-up:nth-child(4) { animation-delay: 0.7s; }

.animate-scale:nth-child(1) { animation-delay: 0.1s; }
.animate-scale:nth-child(2) { animation-delay: 0.2s; }
.animate-scale:nth-child(3) { animation-delay: 0.3s; }
.animate-scale:nth-child(4) { animation-delay: 0.4s; }

.animate-slide-left:nth-child(1) { animation-delay: 0.1s; }
.animate-slide-up:nth-child(2) { animation-delay: 0.2s; }
.animate-slide-right:nth-child(3) { animation-delay: 0.3s; }
.animate-slide-left:nth-child(4) { animation-delay: 0.4s; }
.animate-slide-up:nth-child(5) { animation-delay: 0.5s; }
.animate-slide-right:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-card {
        min-width: 300px;
    }
    
    .slider-controls {
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .emergency-popup {
        right: 10px;
        bottom: 10px;
        left: 10px;
        max-width: none;
    }
    
    .testimonial-card {
        min-width: 280px;
        padding: 1.5rem;
    }
    
    .slider-btn {
        width: 45px;
        height: 45px;
    }
}