/* Base Styles & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #10b981;
    --dark-green: #059669;
    --light-green: #d1fae5;
    --primary-yellow: #fbbf24;
    --light-yellow: #fef3c7;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(180deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 0;
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-green);
}

.logo-img {
    height: 120px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-green);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.menu-toggle:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 4px;
}

/* Buttons */
.cta-button {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.cta-button::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;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button-secondary {
    background: white;
    color: var(--dark-green);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button-secondary:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-yellow) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 170px;
    padding-bottom: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-yellow) 0%, transparent 70%);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideInLeft 1s ease;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    animation: slideInLeft 1s ease 0.2s both;
    line-height: 1.8;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: slideInLeft 1s ease 0.4s both;
}

.hero-image {
    position: relative;
    animation: slideInRight 1s ease;
}

.hero-image-box {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-image-box::before {
    content: '🏥';
    font-size: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(251, 191, 36, 0.1));
    border-radius: 10px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(251, 191, 36, 0.15));
    border-color: var(--primary-green);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-green);
}

/* Services Section */
.services {
    padding: 5rem 2rem;
    background: white;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: var(--dark-green);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow));
    border-radius: 2px;
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: linear-gradient(135deg, var(--light-green), white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(251, 191, 36, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.3);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: var(--transition-bounce);
    display: inline-block;
    position: relative;
    z-index: 1;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-green);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Gallery Section */
.gallery {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--light-yellow), var(--light-green));
}

.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    background: white;
    aspect-ratio: 3 / 4;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-image:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.gallery-image:hover img {
    transform: scale(1.1);
}

/* Mission Section */
.mission {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--light-yellow), var(--light-green));
    position: relative;
    z-index: 1;
}

.mission-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.mission-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
}

.mission-text::before {
    content: '"';
    font-size: 100px;
    position: absolute;
    top: -20px;
    left: 30px;
    color: var(--primary-green);
    opacity: 0.2;
}

/* Palliative Care Section */
.palliative {
    padding: 5rem 2rem;
    background: white;
}

.palliative-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.care-type {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(251, 191, 36, 0.05));
    border-radius: 20px;
    border-left: 5px solid var(--primary-green);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.care-type::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: linear-gradient(180deg, var(--primary-green), var(--primary-yellow));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.care-type:hover::before {
    transform: scaleY(1);
}

.care-type:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.care-type h3 {
    color: var(--dark-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: white;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    padding: 0.5rem;
    border-radius: 8px;
}

.info-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

.info-icon {
    font-size: 1.5rem;
}

.hours-table {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition-smooth);
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-row:hover {
    padding-left: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--text-dark), #374151);
    color: white;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow), var(--primary-green));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

/* Responsive */
@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;
    }
}

@media print {
    nav,
    .hero-buttons,
    .menu-toggle {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .hero,
    .services,
    .mission,
    .palliative,
    .contact {
        page-break-inside: avoid;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-container {
        padding: 0.5rem 1rem;
        gap: 1rem;
    }

    .logo-img {
        height: 70px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        gap: 0;
        border-top: 3px solid var(--primary-green);
    }

    .nav-links li {
        border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hero Section */
    .hero {
        padding-top: 90px;
        min-height: 100vh;
        padding-bottom: 1rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1rem;
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .hero-image-box {
        padding: 1.5rem 1rem;
    }

    .hero-image-box h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .hero-image-box::before {
        font-size: 80px;
        opacity: 0.05;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .stat-card div:last-child {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Section Titles */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Services Section */
    .services {
        padding: 3rem 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    /* Mission Section */
    .mission {
        padding: 3rem 1rem;
    }

    .mission-text {
        padding: 2rem 1.5rem;
        font-size: 1.1rem;
    }

    .mission-text::before {
        font-size: 60px;
        top: -10px;
        left: 15px;
    }

    /* Palliative Care */
    .palliative {
        padding: 3rem 1rem;
    }

    .palliative-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .care-type {
        padding: 1.5rem;
    }

    .care-type h3 {
        font-size: 1.3rem;
    }

    /* Gallery */
    .gallery {
        padding: 3rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-image {
        aspect-ratio: 4 / 5;
    }

    /* Contact Section */
    .contact {
        padding: 3rem 1rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info h3 {
        font-size: 1.3rem;
    }

    .info-item {
        font-size: 0.95rem;
    }

    .hours-table {
        padding: 1rem;
    }

    .hours-row {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }

    /* Footer */
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .nav-container {
        padding: 0.5rem 2rem;
    }

    .logo-img {
        height: 100px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
