/* ==========================================================================
   DR NOR FAIZAL THEME — MAIN STYLESHEET
   Oxford-trained Neurooncologist. Precision. Compassion. Results.
   ========================================================================== */

:root {
  /* Color Palette */
  --primary: #1a472a;        /* Deep forest green (batik) */
  --secondary: #d4a574;      /* Warm gold */
  --accent: #e63946;         /* Medical red */
  --success: #2a9d8f;        /* Surgical teal */
  --warning: #f4a261;        /* Caution orange */
  --danger: #e63946;         /* Emergency red */
  --light: #f8f9fa;          /* Off-white */
  --dark: #1a1a1a;           /* Near black */
  --gray-200: #e9ecef;
  --gray-400: #adb5bd;
  --gray-600: #495057;
  
  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  --letter-spacing: 0.5px;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Breakpoints */
  --bp-mobile: 640px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1280px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.2);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Dark Mode */
html.dark-mode {
  --primary: #c8a882;
  --secondary: #8b6f47;
  --light: #1a1a1a;
  --dark: #f8f9fa;
  --gray-200: #2d2d2d;
  --gray-400: #555555;
  --gray-600: #999999;
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--dark);
  background: var(--light);
  letter-spacing: var(--letter-spacing);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
}

a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Links with underline animation */
a.link-underline {
  position: relative;
  text-decoration: none;
}

a.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

a.link-underline:hover::after {
  width: 100%;
}

/* Lists */
ul, ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-sm);
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--secondary);
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
  font-style: italic;
  color: var(--gray-600);
}

/* Code */
code, pre {
  background: var(--gray-200);
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875em;
}

code {
  padding: 0.2em 0.4em;
}

pre {
  padding: var(--spacing-md);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}

pre code {
  padding: 0;
  background: none;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* CTA Button (emergency/appointment) */
.btn-cta {
  background: var(--accent);
  color: white;
  font-size: 1.125rem;
  padding: var(--spacing-md) var(--spacing-xl);
  border-color: var(--accent);
}

.btn-cta:hover {
  background: darken(#e63946, 10%);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.2);
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border-top: 4px solid var(--secondary);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--secondary);
  color: white;
}

/* Alerts */
.alert {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 6px;
  margin-bottom: var(--spacing-md);
  border-left: 4px solid;
}

.alert-info {
  background: #e7f3ff;
  border-color: #2196f3;
  color: #0c3e7a;
}

.alert-warning {
  background: #fff3e0;
  border-color: #ff9800;
  color: #663c00;
}

.alert-danger {
  background: #ffebee;
  border-color: #e63946;
  color: #7a0f1c;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-sm {
  max-width: 768px;
}

.container-lg {
  max-width: 1400px;
}

/* Grid */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Flex */
.flex {
  display: flex;
  gap: var(--spacing-md);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Section */
section {
  padding: var(--spacing-2xl) var(--spacing-md);
}

section.section-alt {
  background: var(--gray-200);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow-md);
}

nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  padding: var(--spacing-md) 0;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-menu a {
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: capitalize;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

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

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  nav {
    gap: var(--spacing-md);
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: var(--spacing-md);
    background: white;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-mobile-toggle {
    display: block;
  }
}

/* Dropdown Nav */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 220px;
  background: white;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  z-index: 200;
  border-top: 3px solid var(--secondary);
}

.dropdown-menu li { margin: 0; }

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 500;
}

.dropdown-menu a:hover {
  background: var(--gray-200);
  color: var(--primary);
  text-decoration: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.lang-switcher a {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.lang-switcher a.active {
  background: var(--primary);
  color: white;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #2d5f3f 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 100%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  color: white;
  margin-bottom: var(--spacing-lg);
  line-height: 1.1;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
  background: var(--dark);
  color: var(--light);
  padding: var(--spacing-2xl) var(--spacing-md);
  margin-top: var(--spacing-2xl);
}

footer a {
  color: var(--secondary);
}

footer a:hover {
  color: white;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
  color: var(--secondary);
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
}

.footer-section ul {
  list-style: none;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--secondary);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

form {
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--gray-400);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-gray { color: var(--gray-600); }

.bg-primary { background: var(--primary); color: white; }
.bg-secondary { background: var(--secondary); }
.bg-light { background: var(--light); }
.bg-dark { background: var(--dark); color: white; }

.m-0 { margin: 0; }
.p-0 { padding: 0; }
.my-lg { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.py-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }

.border-top { border-top: 1px solid var(--gray-200); }
.border-bottom { border-bottom: 1px solid var(--gray-200); }

.opacity-75 { opacity: 0.75; }
.opacity-50 { opacity: 0.5; }

.rounded { border-radius: 8px; }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in { animation: fadeIn 0.6s ease-out; }
.slide-up { animation: slideUp 0.6s ease-out; }

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background: #25d366;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  text-decoration: none;
}

.whatsapp-float:hover {
  background: #128c7e;
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
}

/* Content Styles */
.content h2 { margin-top: var(--spacing-xl); }
.content h3 { margin-top: var(--spacing-lg); color: var(--primary); }
.content table { width: 100%; border-collapse: collapse; margin-bottom: var(--spacing-lg); }
.content th { background: var(--primary); color: white; padding: 0.75rem 1rem; text-align: left; font-family: var(--font-body); }
.content td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-200); }
.content tr:hover td { background: var(--gray-200); }
.content blockquote { border-left: 4px solid var(--secondary); padding: 1rem 1.5rem; background: var(--gray-200); border-radius: 0 6px 6px 0; }

/* Print Styles */
@media print {
  header, footer, .no-print, .whatsapp-float { display: none; }
  body { background: white; color: black; }
  a { color: var(--primary); }
}
