/* Ohanity Health - Professional, Eye-Friendly CSS */
:root {
  /* Warm, eye-friendly color palette to reduce blue light strain */
  --primary-bg: #f9f7f4;          /* Warm off-white background */
  --secondary-bg: #ffffff;        /* Pure white for cards */
  --accent-green: #4a7c59;        /* Deep forest green */
  --accent-light: #6b9a7c;       /* Lighter green */
  --accent-warm: #8fbc8f;         /* Sage green */
  --text-primary: #2c3e30;        /* Dark green-gray text */
  --text-secondary: #5a6b5d;      /* Medium green-gray */
  --text-muted: #7a8b7d;          /* Light green-gray */
  --warm-beige: #f5f3f0;          /* Warm beige */
  --soft-cream: #fefcf8;          /* Soft cream */
  --border-light: #e8e6e3;        /* Light warm border */
  --shadow: 0 4px 20px rgba(76, 124, 89, 0.08);
  --shadow-hover: 0 8px 30px rgba(76, 124, 89, 0.15);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  word-wrap: break-word;
}

/* Prevent horizontal overflow */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* Navigation */
nav {
  background: var(--secondary-bg);
  box-shadow: var(--shadow);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-green);
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--warm-beige);
  color: var(--accent-green);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 1rem;
    background: var(--secondary-bg);
    border-radius: 0 0 var(--radius) var(--radius);
  }
  
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }
  
  .nav-links li {
    flex: 1 1 30%;
    max-width: 30%;
  }
  
  .nav-links li:nth-child(4),
  .nav-links li:nth-child(5) {
    flex: 1 1 35%;
    max-width: 35%;
    margin-top: 0.25rem;
  }
  
  .nav-links a {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    display: block;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--soft-cream);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 124, 89, 0.2);
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.5rem;
    gap: 0.75rem;
  }
  
  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .nav-links li {
    flex: none;
    max-width: 100%;
    width: 100%;
  }
  
  .nav-links a {
    text-align: center;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    width: 100%;
    display: block;
    background: var(--soft-cream);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 124, 89, 0.25);
  }
}

/* Header/Hero */
.hero {
  background: linear-gradient(135deg, var(--soft-cream) 0%, var(--warm-beige) 100%);
  padding: 4rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem 0.5rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Mobile Container Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

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

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

/* Mobile Section Adjustments */
@media (max-width: 768px) {
  .section {
    padding: 2.5rem 0;
  }
}

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

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-green);
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--secondary-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

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

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent-green);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-green);
  border: 2px solid var(--accent-green);
}

.btn-secondary:hover {
  background: var(--accent-green);
  color: white;
}

/* Mobile Button Adjustments */
@media (max-width: 768px) {
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    display: block;
    text-align: center;
    margin: 0 auto 1rem;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: none;
  }
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--soft-cream);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(76, 124, 89, 0.1);
}

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

/* Footer */
footer {
  background: var(--accent-green);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: white;
  text-decoration: underline;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.created-by {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.ramstar-link {
  display: inline-block;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.ramstar-link:hover {
  transform: scale(1.05);
}

.ramstar-logo {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.3s ease;
  display: block;
  max-width: 40px !important;
  max-height: 40px !important;
}

.ramstar-logo:hover {
  border-color: rgba(255, 255, 255, 0.8);
}

/* Ensure image loads properly */
.ramstar-logo {
  background-color: rgba(255, 255, 255, 0.1);
  min-width: 40px;
  min-height: 40px;
}

/* Mobile logo fixes */
@media (max-width: 768px) {
  .ramstar-logo {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-width: 1px;
  }
  
  .footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }
  
  .ramstar-link {
    display: inline-block;
  }
  
  .created-by {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .ramstar-logo {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
  }
  
  .created-by {
    font-size: 0.65rem;
  }
}

/* Force logo to stay in footer only */
footer .ramstar-logo {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
}

/* Hide any ramstar logos outside of footer */
body > *:not(footer) .ramstar-logo,
main .ramstar-logo,
nav .ramstar-logo,
header .ramstar-logo {
  display: none !important;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-left {
    align-items: center;
  }
  
  .footer-left p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }
  
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .footer-link {
    font-size: 0.85rem;
  }
  
  .footer-branding {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .footer-content {
    gap: 1rem;
  }
  
  .footer-left p {
    font-size: 0.8rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-divider {
    display: none;
  }
  
  .footer-link {
    font-size: 0.9rem;
    padding: 0.25rem;
  }
}

/* Research specific styles */
.research-highlight {
  background: var(--soft-cream);
  border-left: 4px solid var(--accent-green);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.research-highlight h4 {
  color: var(--accent-green);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* Product grid for shop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--secondary-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

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

.product-image {
  height: 200px;
  background: var(--warm-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent-green);
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-green);
  margin: 1rem 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero {
    padding: 3rem 1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
}

/* Research Timeline Styles */
.research-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.research-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-light);
}

.timeline-entry {
  background: var(--secondary-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  padding: 2rem;
  position: relative;
  margin-left: 60px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.timeline-entry:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(5px);
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -71px;
  top: 2rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 4px solid var(--secondary-bg);
  box-shadow: 0 0 0 2px var(--accent-green);
}

.timeline-date {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  display: inline-block;
  background: var(--warm-beige);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.timeline-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.timeline-content {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.timeline-source {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.timeline-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.timeline-tag {
  background: var(--accent-warm);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Responsive timeline */
@media (max-width: 768px) {
  .research-timeline::before {
    left: 15px;
  }
  
  .timeline-entry {
    margin-left: 40px;
  }
  
  .timeline-entry::before {
    left: -56px;
    width: 15px;
    height: 15px;
  }
}

/* Animation utilities */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Legal Pages Styles */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.legal-content h2 {
  color: var(--accent-green);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.legal-content h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.legal-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.legal-content a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-content a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.last-updated {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-notice {
  background: var(--soft-cream);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.legal-notice h3 {
  color: var(--accent-green);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.legal-notice p {
  margin-bottom: 0;
  font-weight: 500;
}
