/* CSS Variables */
:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.55 0.15 190);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.145 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.145 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --gracepharma-teal: oklch(0.55 0.15 190);
  --gracepharma-light: oklch(0.95 0.02 190);
  --gracepharma-dark: oklch(0.25 0.1 190);
  --radius: 0.625rem;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.65 0.15 190);
  --primary-foreground: oklch(0.145 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 2rem;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

/* Language Toggle */
.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--muted);
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.lang-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.lang-btn:hover:not(.active) {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* Main Content */
.main {
  min-height: 100vh;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--background) 0%, var(--background) 50%, var(--muted) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/public/assets/images/abstract-pharmaceutical-background-clean-minimal.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.05;
}

/* center the image */
.hero-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-content img {
  height: 100px;
  width: auto;
}


.hero-title {
  font-size: 3rem;
  font-weight: 300;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  text-wrap: balance;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  text-wrap: balance;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: balance;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Features Section */
.features {
  padding: 6rem 0;
  background-color: var(--background);
}

.features-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.features-header {
  text-align: center;
  margin-bottom: 4rem;
}

.features-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.features-grid {
  display: grid;
  gap: 4rem;
  max-width: 64rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-item {
  text-align: center;
}

.feature-number {
  font-size: 3.75rem;
  font-weight: 300;
  color: var(--primary);
  margin-bottom: 2rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--muted-foreground);
  line-height: 1.625;
}

/* Representations Section */
.representations {
  padding: 6rem 0;
  background-color: var(--background);
}

.representations-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.representations-title {
  font-size: 2.25rem;
  font-weight: 300;
  color: var(--foreground);
  margin-bottom: 2rem;
}

.representations-content {
  max-width: 32rem;
  margin: 0 auto;
}

.representations-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  background-color: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.representations-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: representations-spin 1s linear infinite;
}

@keyframes representations-spin {
  to {
    transform: rotate(360deg);
  }
}

.representations-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.representations-description {
  color: var(--muted-foreground);
  line-height: 1.625;
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background-color: rgba(0, 0, 0, 0.03);
}

.contact-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact-title {
  font-size: 2.25rem;
  font-weight: 300;
  color: var(--foreground);
  margin-bottom: 2rem;
}

.contact-content {
  display: grid;
  gap: 4rem;
  max-width: 72rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .contact-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Contact Form */
.contact-form-card {
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.contact-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.form-submit:hover {
  background-color: var(--gracepharma-dark);
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-info-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-info-value {
  font-size: 1.125rem;
  color: var(--foreground);
}

/* Responsive Design */
@media (max-width: 767px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-content {
    padding: 0.75rem 0;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .features-container,
  .representations-container,
  .contact-container {
    padding: 0 1rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.nav-link:focus,
.lang-btn:focus,
.form-input:focus,
.form-textarea:focus,
.form-submit:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* Add this to your styles.css */
#form-message .success-message {
  color: #28a745; /* green */
  background-color: #e9f7eb;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  border: 1px solid #a3d8b0;
}

#form-message .error-message {
  color: #dc3545; /* red */
  background-color: #f8d7da;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
}

/* Captcha styles */
.captcha-group {
  margin-bottom: 1.5rem;
}

.captcha-question {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  border: 1px solid #e9ecef;
}

#captcha-question {
  font-weight: 500;
  color: #495057;
  font-size: 1rem;
}

.captcha-refresh {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.captcha-refresh:hover {
  color: var(--primary);
  background-color: rgba(59, 130, 246, 0.1);
}

.captcha-refresh:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.captcha-input {
  width: 100%;
}

/* Loading animation for form submission */
.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

.form-submit:disabled::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: form-spin 1s linear infinite;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes form-spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Improved form message styles */
.form-message {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Better focus states */
.captcha-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}