/* Clinical PNEI - Professional Medical Website Styles */

/* CSS Variables */
:root {
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary-color: #0f766e;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-alt: #f8fafc;
  --border-color: #e5e7eb;
  --max-width: 1200px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  font-size: 16px;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--primary-dark); }

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-links a:hover {
  border-bottom-color: var(--primary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-toggle {
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
}

.language-toggle:hover {
  background: var(--primary-color);
  color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Hero Section */
.hero {
  background: linear-gradient(160deg, #1e3a8a 0%, #1e40af 40%, #2563eb 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  animation: heroShimmer 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroShimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5%, 3%); }
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.hero .tagline {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease-out 0.15s forwards;
  opacity: 0;
}

.hero .subtitle {
  font-size: 1.125rem;
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

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

/* Sections */
.section {
  padding: 5rem 0;
}

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

.section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-dark);
}

/* Profile */
.profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.profile-image {
  max-width: 600px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  aspect-ratio: 977/720;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-image.no-image {
  background: var(--border-color);
}

.profile-image.no-image::after {
  content: '📷';
  font-size: 4rem;
}

/* Research Grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.research-card {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
}

.research-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.role-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.role-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Affiliations */
.affiliations-list {
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
}

.affiliations-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.affiliations-list li:last-child {
  border-bottom: none;
}

.affiliations-list strong {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--primary-dark);
  color: white;
}

/* Contact */
address {
  font-style: normal;
  text-align: center;
}

/* Footer */
footer {
  background: var(--text-color);
  color: white;
  padding: 3rem 0;
}

.footer-content {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: white;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
  color: white;
}

.disclaimer {
  font-size: 0.875rem;
  opacity: 0.7;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.copyright {
  font-size: 0.875rem;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-color);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a {
    display: block;
    padding: 1rem;
  }

  .nav-links .cta-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
  }
  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1.25rem;
  }

  .profile {
    grid-template-columns: 1fr;
  }

  .profile-image {
    max-width: 100%;
    margin: 0 auto;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }

  .hero {
    padding: 4rem 0;
  }
}

/* Noscript */
.noscript-links {
  background: var(--bg-alt);
  padding: 1rem;
  text-align: center;
}

/* CTA Link in Navigation */
.nav-links .cta-link {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  border-bottom: none;
  white-space: nowrap;
}

.nav-links .cta-link:hover {
  background: var(--primary-dark);
  color: white;
  border-bottom: none;
}

/* Membership Form */
.membership-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--text-color);
  background: var(--bg-color);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.5);
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

a:focus-visible,
.btn:focus-visible,
.cta-link:focus-visible,
  .language-toggle:focus-visible,
  .mobile-menu-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-primary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Form Messages */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-message-success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message-error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Responsive Form */
@media (max-width: 768px) {
  .membership-form {
    padding: 1.5rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  z-index: 200;
  transition: top 0.2s;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* Utility Classes */
.mb-2 { margin-bottom: 2rem; }
.membership-intro {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Error Page (404) */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.error-code {
  font-size: 6rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero h1,
  .hero .tagline,
  .hero .subtitle,
  .hero::before {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
