/* ============================================================
   PUBLIC.CSS — Universal stylesheet for index, login, daftar
   Klinik Asy-Syifa Husada | Takeran, Magetan
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ecfdf5;
  --secondary: #0c4a6e;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --card-bg: #ffffff;
  --shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
  --shadow-hover: 0 8px 20px rgba(13, 148, 136, 0.15);
  --shadow-lg: 0 10px 40px rgba(13, 148, 136, 0.1);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================
   AUTH PAGES (login.php + daftar.php)
   ============================================================ */

.auth-page body,
body:has(.auth-card) {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* For auth pages that don't use :has() */
.auth-bg ~ .auth-card,
.auth-bg + .auth-card { display: block; }

body { font-family: 'Inter', sans-serif; }

/* Auth background shapes */
.auth-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.auth-shape { position: absolute; border-radius: 50%; opacity: 0.15; animation: float 20s infinite ease-in-out; }
.shape-1 { width: 300px; height: 300px; background: var(--primary); top: -100px; left: -100px; }
.shape-2 { width: 400px; height: 400px; background: var(--primary-dark); bottom: -150px; right: -150px; }
.shape-3 { width: 250px; height: 250px; background: var(--primary); top: 50%; right: 10%; }
@keyframes float { 0%,100%{transform:translate(0,0) rotate(0deg);}25%{transform:translate(20px,-20px) rotate(5deg);}50%{transform:translate(-15px,15px) rotate(-5deg);}75%{transform:translate(15px,20px) rotate(3deg);} }

/* Auth card */
.auth-card { width: min(520px, calc(100% - 2rem)); background: white; border-radius: 24px; box-shadow: 0 20px 60px rgba(13, 148, 136, 0.12); overflow: hidden; animation: slideUp 0.6s ease-out; margin: 1rem auto; }
@keyframes slideUp { from{opacity:0;transform:translateY(30px);} to{opacity:1;transform:translateY(0);} }

/* Auth header */
.auth-header { text-align: center; padding: 2.5rem 2rem; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; }
.auth-logo { width: 70px; height: 70px; background: rgba(255,255,255,0.25); border: 3px solid rgba(255,255,255,0.4); border-radius: 20px; margin: 0 auto 1.25rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: bold; overflow: hidden; }
.auth-header h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.5rem; }
.auth-header p { opacity: 0.95; font-size: 1rem; margin: 0; }

/* Auth form */
.auth-form { padding: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--secondary); margin-bottom: 0.625rem; font-size: 0.95rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.875rem 1rem; border: 2px solid var(--gray-light); border-radius: 12px; font-size: 1rem; background: var(--light); transition: all .3s; font-family: 'Inter', sans-serif; }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(13,148,136,0.1); }
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 3rem; }
.password-toggle { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray); }
.password-toggle:hover { color: var(--primary); }
.form-hint { display: block; font-size: 0.85rem; color: var(--gray); margin-top: 0.375rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: 0.625rem; cursor: pointer; color: var(--gray); font-size: 0.9rem; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 0.125rem; flex-shrink: 0; }
.link-terms { color: var(--primary); text-decoration: none; font-weight: 500; }
.link-terms:hover { text-decoration: underline; }

/* Buttons */
.btn { padding: 0.75rem 1.5rem; border: none; border-radius: 12px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; font-family: 'Inter', sans-serif; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; width: 100%; padding: 1rem; font-size: 1.05rem; box-shadow: 0 4px 15px rgba(13,148,136,0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3); }
.btn-secondary { background: white; color: var(--primary); border: 2px solid var(--primary); box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1); }
.btn-secondary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2); }

/* Auth footer — UNIFIED for login & daftar */
.auth-footer { text-align: center; padding: 0 2rem 2rem; color: var(--gray); font-size: 0.95rem; }
.auth-footer p { margin-bottom: 0.75rem; }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; color: var(--gray) !important; font-weight: 500 !important; font-size: 0.9rem; margin-top: 0.25rem; padding: 0.5rem 0.75rem; border-radius: 8px; transition: all 0.2s; }
.back-link:hover { background: var(--primary-light); color: var(--primary) !important; text-decoration: none !important; }
.back-link svg { flex-shrink: 0; }

/* Toast */
.toast { position: fixed; top: 24px; right: 24px; padding: 1rem 1.5rem; border-radius: 12px; color: white; font-weight: 500; box-shadow: 0 8px 25px rgba(0,0,0,0.2); transform: translateX(400px); transition: transform 0.4s; z-index: 9999; max-width: 350px; }
.toast.show { transform: translateX(0); }
.toast.success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.toast.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

/* Auth responsive */
@media (max-width: 640px) {
  .auth-card { border-radius: 20px; }
  .auth-header { padding: 2rem 1.5rem; }
  .auth-header h1 { font-size: 1.5rem; }
  .auth-form { padding: 1.5rem; }
  .auth-footer { padding: 0 1.5rem 1.5rem; }
}

/* ============================================================
   INDEX PAGE (index.html)
   ============================================================ */

.index-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  color: #1e293b;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 5%; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 20px rgba(13,148,136,0.1); position: sticky; top: 0; z-index: 100; border-bottom: 2px solid rgba(13,148,136,0.1); }
.nav-brand { display: flex; align-items: center; gap: 0.75rem; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--secondary); transition: transform 0.3s; text-decoration: none; line-height: 1.2; }
.nav-brand:hover { transform: scale(1.02); }
.nav-brand-sub { font-size: 0.7rem; font-weight: 500; color: var(--gray); display: block; letter-spacing: 0.03em; }
.logo { height: 42px; width: 42px; border-radius: 10px; box-shadow: 0 2px 8px rgba(13,148,136,0.2); object-fit: cover; }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-link { text-decoration: none; color: var(--secondary); font-weight: 600; display: flex; align-items: center; gap: 4px; transition: all 0.3s; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav-link:hover { color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.hamburger { display: none; background: none; border: none; font-size: 1.8rem; color: var(--secondary); cursor: pointer; padding: 0.5rem; }

/* Mobile Menu */
.mobile-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: white; box-shadow: -4px 0 20px rgba(0,0,0,0.1); transition: right 0.3s; z-index: 1000; padding: 2rem; }
.mobile-menu.active { right: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--gray-light); }
.mobile-menu-links { display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-menu-links a { padding: 1rem; text-decoration: none; color: var(--secondary); font-weight: 600; border-radius: 8px; display: flex; align-items: center; gap: 0.5rem; transition: all 0.3s; }
.mobile-menu-links a:hover { background: var(--primary-light); color: var(--primary); }
.menu-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; z-index: 999; }
.menu-overlay.active { display: block; }

/* Hero */
.hero { display: flex; align-items: center; gap: 4rem; padding: 5rem 5%; max-width: 1400px; margin: 0 auto; position: relative; }
.hero-content { flex: 1; animation: slideInLeft 0.8s ease-out; }
@keyframes slideInLeft { from{opacity:0;transform:translateX(-30px);} to{opacity:1;transform:translateX(0);} }
.hero-content h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 3.1rem; font-weight: 900; margin-bottom: 1.5rem; line-height: 1.15; color: var(--secondary); letter-spacing: -0.5px; }
.highlight { position: relative; color: var(--primary); display: inline-block; }
.highlight::after { content: ''; position: absolute; bottom: 6px; left: 0; width: 100%; height: 6px; background: linear-gradient(90deg, rgba(13,148,136,0.3), rgba(13,148,136,0.1)); border-radius: 3px; z-index: -1; }
.subtitle { font-size: 1.15rem; color: var(--gray); margin-bottom: 2.5rem; max-width: 560px; line-height: 1.8; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cta .btn { padding: 0.85rem 1.6rem; width: auto; font-size: 1rem; }
.hero-image { flex: 1; display: flex; justify-content: center; animation: fadeInScale 1s ease-out 0.3s both; position: relative; }
@keyframes fadeInScale { from{opacity:0;transform:scale(0.9);} to{opacity:1;transform:scale(1);} }
.hero-image-ring { position: relative; display: inline-block; }
.hero-image-ring::before { content: ''; position: absolute; inset: -12px; border-radius: 28px; border: 3px solid rgba(13,148,136,0.2); animation: ringPulse 3s ease-in-out infinite; }
.hero-image-ring::after { content: ''; position: absolute; inset: -24px; border-radius: 32px; border: 2px dashed rgba(13,148,136,0.12); animation: ringPulse 3s ease-in-out infinite 0.5s; }
@keyframes ringPulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(1.02);} }
.hero-logo { width: 340px; height: 340px; object-fit: cover; border-radius: 24px; box-shadow: 0 20px 60px rgba(13,148,136,0.22); border: 4px solid white; transition: transform 0.4s; display: block; }
.hero-logo:hover { transform: scale(1.04) rotate(1.5deg); }

/* Info Grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; padding: 5rem 5%; max-width: 1400px; margin: 0 auto; }
.info-card { background: white; border-radius: var(--radius); padding: 2.5rem; text-align: center; box-shadow: 0 4px 20px rgba(13,148,136,0.08); transition: all 0.4s cubic-bezier(0.4,0,0.2,1); border: 2px solid transparent; position: relative; overflow: hidden; }
.info-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); transform: scaleX(0); transition: transform 0.4s; }
.info-card:hover { transform: translateY(-10px); box-shadow: 0 12px 40px rgba(13,148,136,0.15); border-color: var(--primary-light); }
.info-card:hover::before { transform: scaleX(1); }
.card-icon { font-size: 3.5rem; margin-bottom: 1.5rem; color: var(--primary); display: inline-block; transition: transform 0.4s; }
.info-card:hover .card-icon { transform: scale(1.2) rotateY(360deg); }
.info-card h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.4rem; margin-bottom: 1rem; color: var(--secondary); font-weight: 700; }
.info-card p { color: var(--gray); font-size: 1rem; line-height: 1.6; }

/* Lokasi Section */
.lokasi-foto { padding: 4rem 5%; max-width: 1400px; margin: 0 auto; }
.lokasi-foto h2 { text-align: center; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2rem; font-weight: 800; color: var(--secondary); margin-bottom: 2.5rem; position: relative; }
.title-gradient { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.title-underline { display: block; width: 60px; height: 4px; background: linear-gradient(90deg, var(--primary), transparent); margin: 0.75rem auto 0; border-radius: 2px; }
.lokasi-card { display: flex; gap: 0; align-items: stretch; background: white; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); border: 2px solid rgba(13,148,136,0.1); transition: transform 0.4s, box-shadow 0.4s; }
.lokasi-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(13,148,136,0.18); }
.lokasi-image { flex: 1; position: relative; overflow: hidden; }
.lokasi-image img { width: 100%; height: 320px; object-fit: cover; transition: transform 0.5s; }
.lokasi-image:hover img { transform: scale(1.1); }
.maps-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,0.2)); display: flex; align-items: flex-end; padding: 1.5rem; }
.maps-button { background: rgba(13,148,136,0.9); color: white; padding: 0.75rem 1.25rem; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(4px); text-decoration: none; transition: all 0.3s; }
.maps-button:hover { background: var(--primary); transform: scale(1.05); }
.lokasi-info { flex: 1; padding: 2.5rem; }
.lokasi-info h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--secondary); margin-bottom: 1rem; }
.lokasi-info p { color: var(--gray); line-height: 1.7; margin-bottom: 1.5rem; }
.lokasi-features { display: flex; flex-direction: column; gap: 1rem; }
.feature-item { display: flex; align-items: center; gap: 10px; }
.feature-item .material-symbols-outlined { color: var(--primary); font-size: 1.4rem; }
.gps-info { margin-top: 2rem; text-align: center; font-size: 0.9rem; color: var(--gray); }

/* Contact Section */
.contact-section { padding: 4rem 5%; background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%); position: relative; overflow: hidden; }
.contact-section::before { content: ''; position: absolute; top: -50%; right: -20%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(13,148,136,0.1), transparent); border-radius: 50%; }
.contact-card { max-width: 900px; margin: 0 auto; background: white; padding: 3rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); position: relative; border: 2px solid rgba(13,148,136,0.1); }
.contact-card h2 { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--secondary); margin-bottom: 2rem; font-size: 1.8rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.contact-list { list-style: none; font-size: 1.05rem; }
.contact-list > li { margin-bottom: 1.5rem; display: flex; align-items: flex-start; gap: 12px; padding: 1rem; border-radius: 10px; transition: background 0.3s; }
.contact-list > li:hover { background: var(--primary-light); }
.contact-list .material-symbols-outlined { color: var(--primary); font-size: 1.5rem; margin-top: 2px; flex-shrink: 0; }
.contact-list a { color: var(--primary); text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.schedule-list { list-style: none; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.schedule-list li { color: var(--gray); font-size: 0.95rem; }

/* Footer */
.footer { text-align: center; padding: 2rem 5%; background: var(--secondary); color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.8; }
.footer strong { color: white; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: white; }

/* News Ticker */
.news-ticker { position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(90deg, var(--secondary) 0%, var(--primary-dark) 100%); color: white; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 1rem; overflow: hidden; z-index: 50; font-size: 0.9rem; }
.ticker-label { white-space: nowrap; font-weight: 700; flex-shrink: 0; font-size: 0.85rem; opacity: 0.9; }
.ticker-content { display: flex; gap: 3rem; animation: ticker 40s linear infinite; white-space: nowrap; }
.ticker-content span { opacity: 0.9; }
@keyframes ticker { from{transform:translateX(0);} to{transform:translateX(-33.33%);} }

/* Assistant Panel */
.assistant-panel { position: fixed; bottom: 80px; right: 24px; background: white; border-radius: 16px; box-shadow: 0 8px 32px rgba(13,148,136,0.2); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; width: 240px; z-index: 200; transform: translateY(20px) scale(0.95); opacity: 0; transition: all 0.4s cubic-bezier(0.4,0,0.2,1); pointer-events: none; border: 2px solid rgba(13,148,136,0.15); }
.assistant-panel.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
.assistant-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.assistant-bubble { font-size: 0.9rem; color: var(--secondary); line-height: 1.5; }
.assistant-actions { display: flex; gap: 0.5rem; }
.assistant-btn { flex: 1; padding: 0.5rem; border: none; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; transition: all 0.2s; background: var(--light); color: var(--secondary); font-family: 'Inter', sans-serif; }
.assistant-btn:hover { background: var(--gray-light); transform: translateY(-1px); }
.assistant-btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.assistant-btn.primary:hover { box-shadow: 0 4px 12px rgba(13,148,136,0.3); }
.assistant-btn .material-symbols-outlined { font-size: 1rem; }

/* Index responsive */
@media (max-width: 900px) {
  .hero { flex-direction: column; padding: 3rem 5%; gap: 2.5rem; text-align: center; }
  .hero-content h1 { font-size: 2.2rem; }
  .subtitle { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-image { width: 100%; }
  .hero-logo { width: 260px; height: 260px; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .lokasi-card { flex-direction: column; }
  .lokasi-image img { height: 250px; }
  .contact-card { padding: 2rem 1.5rem; }
}
@media (max-width: 640px) {
  .hero-content h1 { font-size: 1.9rem; }
  .hero-logo { width: 220px; height: 220px; }
  .info-grid { padding: 3rem 5%; }
  .assistant-panel { right: 12px; bottom: 60px; width: 210px; }
  .assistant-actions { flex-direction: column; }
}