/* Modern Medical Design System */
:root {
  /* Base Variables (Light Mode Default) */
  --primary-color: #0056b3;
  /* Deep Blue */
  --secondary-color: #00a8cc;
  /* Cyan */
  --accent-color: #ff6b6b;
  --text-main: #2c3e50;
  --text-muted: #6c757d;
  --bg-body: #ffffff;
  --bg-surface: #f8f9fa;
  --bg-card: #ffffff;
  --border-color: #e9ecef;
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
}

[data-theme="dark"] {
  --primary-color: #4da3ff;
  /* Lighter Blue for dark mode contrast */
  --secondary-color: #33ddff;
  --text-main: #e0e6ed;
  --text-muted: #a0aab5;
  --bg-body: #1a202c;
  /* Dark Blue-Grey */
  --bg-surface: #2d3748;
  --bg-card: #2d3748;
  --border-color: #4a5568;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
.navbar,
.nav-menu,
.card,
.product-card,
.pill-link,
.btn,
.btn-cookie-accept,
.btn-cookie-decline,
.theme-toggle-btn,
.cookie-banner,
footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.6;
  background-color: var(--bg-body);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text-main);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
  color: var(--primary-color);
}

.section-title {
  text-align: center;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

section {
  padding: var(--spacing-lg) 0;
}

/* Navigation */
.navbar {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px var(--shadow-color);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding-bottom: 5px;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: all 0.3s;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s;
  margin-left: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface);
  color: var(--primary-color);
}

/* Profile Image */
.profile-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  margin-top: 80px;
  /* Navbar height */
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-body) 100%);
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: rgba(0, 168, 204, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    animation: fadeIn 1s ease-out;
  }
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  font-weight: 300;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #004494;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px var(--shadow-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-left: var(--spacing-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
  transform: translateY(-2px);
}

/* About Section */
.about {
  background-color: var(--bg-body);
}

/* Nephrology Section */
.nephrology {
  background-color: var(--bg-surface);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.card {
  background: var(--bg-card);
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: 0 2px 4px var(--shadow-color);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px var(--shadow-color);
  border-color: var(--primary-color);
}

.card-icon {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: var(--spacing-sm);
}

.card h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Digital Products Section */
.products-section {
  background-color: var(--bg-body);
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  max-width: 800px;
  margin: 0 auto 2rem;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-color);
  border-color: var(--primary-color);
}

.product-content h3 {
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
}

.product-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: var(--spacing-sm);
}


/* Links Section */
.quick-links {
  text-align: center;
}

.link-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.pill-link {
  background: var(--bg-card);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.pill-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--bg-surface);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: var(--spacing-lg) 0;
  text-align: center;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
  color: white;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.social-links a {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.social-links a:hover {
  transform: translateY(-3px) scale(1.1);
}

.footer-contact {
  margin-bottom: var(--spacing-sm);
}

.footer-contact a {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-card);
    flex-direction: column;
    align-items: center;
    padding-top: var(--spacing-lg);
    transition: 0.4s ease;
    box-shadow: -5px 0 10px var(--shadow-color);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .hero-content {
    text-align: center;
    margin: 0 auto;
  }

  .btn {
    display: block;
    width: 100%;
    margin: var(--spacing-sm) 0 0 0;
  }
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 10px var(--shadow-color);
  z-index: 2000;
  padding: var(--spacing-md);
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-banner {
    animation: slideUp 0.5s ease-out;
  }
}

.cookie-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  padding: 0 var(--spacing-sm);
}

.cookie-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-main);
}

.cookie-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.btn-cookie-accept {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn-cookie-accept:hover {
  background-color: #004494;
}

.btn-cookie-decline {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-cookie-decline:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--text-muted);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}