/* ==================== CSS RESET & BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Medical Color Palette */
    --primary-blue: #0066cc;
    --secondary-blue: #004d99;
    --medical-green: #00a86b;
    --light-green: #e6f7f0;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #343a40;
    --text-dark: #212529;
    --text-light: #6c757d;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ==================== HEADER & NAVIGATION ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px var(--shadow-hover);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text h2 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--medical-green);
    margin: 0;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.emergency-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.emergency-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('images/hero-banner.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.8), rgba(0, 168, 107, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--light-green);
}

.hero-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--white);
}

.stat-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SECTION STYLES ==================== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--medical-green));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 20px;
}

/* ==================== ABOUT SECTION ==================== */
.about {
    background: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}

.about-text h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    color: var(--medical-green);
    font-size: 1.2rem;
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.vision-mission {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.vm-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vm-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.vm-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--medical-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.vm-icon i {
    font-size: 2rem;
    color: var(--white);
}

.vm-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.vm-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ==================== DEPARTMENTS SECTION ==================== */
.departments {
    background: var(--white);
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.dept-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-blue);
}

.dept-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
    border-top-color: var(--medical-green);
}

.dept-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--medical-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.dept-card:hover .dept-icon {
    transform: scale(1.1) rotate(5deg);
}

.dept-icon i {
    font-size: 2rem;
    color: var(--white);
}

.dept-card h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.dept-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.dept-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.dept-link:hover {
    gap: 10px;
    color: var(--medical-green);
}

/* ==================== DOCTORS SECTION ==================== */
.doctors {
    background: var(--light-gray);
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.doctor-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.doctor-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.doctor-card:hover .doctor-image img {
    transform: scale(1.1);
}

.doctor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 102, 204, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.doctor-card:hover .doctor-overlay {
    opacity: 1;
}

.doctor-social {
    display: flex;
    gap: 15px;
}

.doctor-social a {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.doctor-social a:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.doctor-info {
    padding: 25px;
    text-align: center;
}

.doctor-info h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.doctor-specialization {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 15px;
}

.doctor-experience,
.doctor-timing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.doctor-experience i,
.doctor-timing i {
    color: var(--medical-green);
}

/* ==================== FACILITIES SECTION ==================== */
.facilities {
    background: var(--white);
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.facility-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.facility-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.facility-image {
    height: 200px;
    overflow: hidden;
}

.facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.facility-card:hover .facility-image img {
    transform: scale(1.1);
}

.facility-content {
    padding: 30px;
}

.facility-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--medical-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.facility-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.facility-content h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.facility-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ==================== APPOINTMENT SECTION ==================== */
.appointment {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
}

.appointment-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}

.appointment-content h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.appointment-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.95;
    line-height: 1.8;
}

.appointment-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appt-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.appt-feature i {
    color: var(--medical-green);
    font-size: 1.2rem;
}

.appointment-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.form-group label i {
    color: var(--primary-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group textarea {
    resize: vertical;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ==================== GALLERY SECTION ==================== */
.gallery {
    background: var(--light-gray);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 102, 204, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2.5rem;
    color: var(--white);
}

/* ==================== TESTIMONIALS SECTION ==================== */
.testimonials {
    background: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--light-gray);
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.testimonial-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.testimonial-rating i {
    color: #ffc107;
    font-size: 1.2rem;
}

.testimonial-text {
    color: var(--text-light);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--medical-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.author-info h4 {
    font-family: var(--font-primary);
    color: var(--text-dark);
    margin-bottom: 3px;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    background: var(--light-gray);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info {
    display: grid;
    gap: 25px;
}

.contact-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-blue), var(--medical-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.contact-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.contact-card h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.contact-card a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--medical-green);
}

.emergency-link {
    color: #ff4444 !important;
    font-weight: 600;
}

.contact-map {
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--primary-blue);
}

.footer-logo h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin: 0;
}

.footer-logo p {
    font-size: 0.9rem;
    color: var(--medical-green);
    margin: 0;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--medical-green);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-blue);
    transform: translateY(-3px);
}

.footer-emergency p {
    margin-bottom: 10px;
}

.footer-emergency a {
    color: var(--medical-green);
    text-decoration: none;
    font-weight: 600;
}

.emergency-note {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem;
    margin-top: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.footer-bottom i {
    color: #ff4444;
}

/* ==================== BACK TO TOP BUTTON ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--medical-green));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .about-content,
    .appointment-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .vision-mission {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 30px 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        padding: 15px 0;
    }
    
    .emergency-btn span {
        display: none;
    }
    
    .hero {
        height: auto;
        min-height: 500px;
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .departments-grid,
    .doctors-grid,
    .facilities-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .appointment-form {
        padding: 25px;
    }
    
    .contact-map {
        height: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

