/* ═══════════════════════════════════════════════════════════════════════════
   CarePlus Hospital Template — CSS
   Theme: Teal/White | Font: Inter | Category: Healthcare
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --primary: #00695c;
  --primary-light: #e0f2f1;
  --primary-dark: #004d40;
  --secondary: #26a69a;
  --secondary-light: #e0f7fa;
  --accent: #ff5722;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --bg: #ffffff;
  --bg-alt: #f0fdfa;
  --border: #e2e8f0;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); line-height: 1.6; background: var(--bg); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p { color: var(--text-light); line-height: 1.7; }

.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-tag { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: 0.8rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.section-title { margin-bottom: 12px; }
.section-sub { max-width: 640px; font-size: 1rem; }
.section-header.center .section-sub { margin: 0 auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; transition: all var(--transition); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--primary); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--primary-light); }
.btn-emergency { background: var(--accent); color: #fff; }
.btn-emergency:hover { background: #e64a19; }

/* Header */
.top-bar { background: var(--primary-dark); color: #fff; padding: 8px 0; font-size: 0.8rem; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #fff; }
.top-bar a:hover { color: var(--secondary); }

.header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--border); transition: all var(--transition); }
.header.scrolled { box-shadow: var(--shadow-md); }
.header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-text span:first-child { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.nav-logo-text span:last-child { font-size: 0.7rem; color: var(--text-light); }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--text-light); position: relative; padding: 4px 0; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width var(--transition); }
.nav-link:hover::after { width: 100%; }
.nav-cta { margin-left: 12px; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1001; }
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Emergency Banner */
.emergency-banner { background: linear-gradient(90deg, var(--accent), #ff7043); color: #fff; padding: 12px 0; text-align: center; font-size: 0.9rem; font-weight: 600; }
.emergency-banner a { color: #fff; text-decoration: underline; margin-left: 8px; }

/* Hero Slider */
.hero-slider { position: relative; min-height: 500px; max-height: 750px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.slide { opacity: 0; visibility: hidden; }
.slide:first-child, .slide.active { opacity: 1; visibility: visible; }
.slide.active { opacity: 1; }
.slide { opacity: 0; visibility: hidden; }
.slide:first-child, .slide.active { opacity: 1; visibility: visible; }
.slide-bg { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,105,92,0.85) 0%, rgba(0,105,92,0.4) 100%); }
.slide-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #fff; }
.slide-content h1 { color: #fff; margin-bottom: 16px; }
.slide-content p { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 600px; margin-bottom: 28px; }
.slide-content .btn-group { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.slider-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.slider-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all var(--transition); }
.slider-dots .dot.active { background: #fff; transform: scale(1.3); }
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.2); color: #fff; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: all var(--transition); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }
.slider-prev:hover, .slider-next:hover { background: rgba(255,255,255,0.4); }

/* Page Hero */
.page-hero { position: relative; padding: 100px 0 60px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 1.05rem; }
.breadcrumb { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.breadcrumb a { color: var(--secondary); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

/* Stats */
.stats-section { padding: 60px 0; background: var(--primary); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item { padding: 24px; }
.counter-number { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.8); font-weight: 500; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Cards */
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { height: 200px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 24px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { font-size: 0.9rem; margin-bottom: 12px; }
.card-link { color: var(--primary); font-weight: 600; font-size: 0.85rem; }

/* Department cards */
.dept-card { padding: 32px; text-align: center; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); transition: all var(--transition); }
.dept-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.dept-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 1.6rem; }
.dept-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.dept-card p { font-size: 0.85rem; }

/* Doctor cards */
.doctor-card { text-align: center; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); transition: all var(--transition); }
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.doctor-avatar { width: 120px; height: 120px; border-radius: 50%; background: var(--primary-light); margin: 0 auto 16px; overflow: hidden; border: 3px solid var(--primary-light); }
.doctor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card h4 { font-size: 1rem; margin-bottom: 4px; color: var(--primary); }
.doctor-card .specialty { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; }
.doctor-card .experience { font-size: 0.75rem; color: var(--text-lighter); }

/* About */
.about-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-list { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.about-list li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-light); }
.about-list li::before { content: '✓'; color: var(--primary); font-weight: 700; }

/* Testimonials */
.testimonial-carousel { position: relative; overflow: hidden; padding: 20px 0; }
.testimonial-track { display: flex; transition: transform 0.5s ease; }
.testimonial-item { min-width: 100%; padding: 0 40px; opacity: 0.3; transition: opacity 0.5s; }
.testimonial-item.active { opacity: 1; }
.testimonial-card { background: #fff; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); border: 1px solid var(--border); max-width: 700px; margin: 0 auto; text-align: center; }
.testimonial-stars { color: #f59e0b; font-size: 1.2rem; margin-bottom: 16px; }
.testimonial-text { font-size: 1.05rem; color: var(--text); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; justify-content: center; gap: 12px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.author-name { font-weight: 600; font-size: 0.95rem; }
.author-role { font-size: 0.8rem; color: var(--text-light); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.carousel-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all var(--transition); }
.carousel-dots .dot.active { background: var(--primary); transform: scale(1.3); }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; z-index: 5; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-prev:hover, .carousel-next:hover { background: var(--primary); color: #fff; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-item.active { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.faq-question { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.faq-question:hover { background: var(--bg-alt); }
.faq-question::after { content: '+'; font-size: 1.4rem; color: var(--primary); transition: transform var(--transition); }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.active .faq-answer { max-height: 300px; padding: 0 24px 18px; }
.faq-answer p { font-size: 0.9rem; color: var(--text-light); }

/* CTA */
.cta-section { padding: 80px 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); text-align: center; color: #fff; }
.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 28px; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.contact-card-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.contact-card h4 { font-size: 0.9rem; margin-bottom: 4px; }
.contact-card p { font-size: 0.85rem; color: var(--text-light); }

.contact-form { background: #fff; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.contact-form h3 { margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; font-family: inherit; transition: border-color var(--transition); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-message { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; margin-top: 12px; }
.form-message.success { background: #dcfce7; color: #166534; }
.form-message.error { background: #fef2f2; color: #991b1b; }

/* Footer */
.footer { background: #0a2e29; color: #94a3b8; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 0.85rem; margin-top: 12px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.85rem; color: #94a3b8; }
.footer-col ul li a:hover { color: var(--secondary); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.85rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }
.social-icons { display: flex; gap: 12px; margin-top: 16px; }
.social-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: all var(--transition); }
.social-icon:hover { background: var(--primary); color: #fff; }

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-content img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: -40px; right: 0; color: #fff; font-size: 2rem; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.5rem; }
.lightbox-prev { left: -50px; }
.lightbox-next { right: -50px; }
.lightbox-counter { text-align: center; color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 12px; }

/* Back to Top */
#backToTop { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(20px); transition: all var(--transition); z-index: 99; }
#backToTop.visible { opacity: 1; transform: translateY(0); }
#backToTop:hover { background: var(--primary-dark); }

/* Animations */
.animate-on-scroll:not(.animated) { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; animation: fadeInFallback 0.6s ease 1s forwards; }
@keyframes fadeInFallback { to { opacity: 1; transform: translateY(0); } }
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* Map */
.map-container { border-radius: var(--radius); overflow: hidden; height: 300px; margin-top: 40px; }
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-menu { position: fixed; top: 0; right: -100%; width: 280px; min-height: 600px; background: #fff; flex-direction: column; align-items: flex-start; padding: 80px 24px 24px; gap: 0; box-shadow: var(--shadow-lg); transition: right var(--transition); z-index: 1000; }
  .nav-menu.active { right: 0; }
  .nav-link { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-left: 0; margin-top: 16px; }
  .hamburger { display: flex; }
  .top-bar .container { flex-direction: column; gap: 4px; }

  .hero-slider { height: 70vh; min-height: 400px; }
  .slide-content h1 { font-size: 1.8rem; }
  .slider-prev, .slider-next { display: none; }

  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-slider { height: 60vh; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
}
