/* ============================================
   RIFOR - The Resonance Institute for Open Research
   Academic Light Blue Theme
   ============================================ */

/* CSS Custom Properties */
:root {
  /* Primary Colors - Light Blue Academic */
  --primary-blue: #1e5a8e;
  --primary-light: #4a90c2;
  --primary-pale: #e8f4fc;
  --primary-hover: #164a78;

  /* Text Colors */
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-light: #718096;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-section: #f0f7fc;

  /* Border & Accent */
  --border-light: #d1e3f0;
  --border-medium: #b0c9dc;
  --accent-gold: #c9a227;

  /* Spacing */
  --section-padding: 80px;
  --container-width: 1200px;

  /* Typography */
  --font-serif: 'Crimson Text', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

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

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

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

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

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: box-shadow var(--transition-smooth);
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(30, 90, 142, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  max-width: var(--container-width);
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width var(--transition-smooth);
}

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

.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle:hover {
  background: var(--primary-pale);
  border-color: var(--primary-light);
}

.btn-nav {
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  background: var(--primary-blue);
  padding: 5px 10px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

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

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--primary-pale) 100%);
  text-align: center;
}

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

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 90, 142, 0.3);
}

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

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

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SECTIONS - General
   ============================================ */
section {
  padding: var(--section-padding) 0;
}

section:nth-child(even) {
  background: var(--bg-section);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-light);
}

.section-header p {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 3rem;
}

.about-card {
  background: var(--bg-white);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  text-align: center;
  transition: all var(--transition-smooth);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 90, 142, 0.12);
  border-color: var(--primary-light);
}

.about-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
}

.about-card h3 {
  color: var(--primary-blue);
  margin-bottom: 0.75rem;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--bg-white);
  padding: 40px 32px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  transition: all var(--transition-smooth);
}

.service-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(30, 90, 142, 0.1);
}

.service-card h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-pale);
}

.service-card ul {
  list-style: none;
  margin-top: 1rem;
}

.service-card li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
}

.service-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 600;
}

/* ============================================
   TECHNOLOGY SECTION
   ============================================ */
.tech-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  margin-top: 3rem;
  overflow-x: auto;
  padding: 10px 0;
}

.tech-step {
  background: var(--bg-white);
  padding: 20px 24px;
  border-radius: 12px;
  border: 2px solid var(--border-light);
  text-align: center;
  min-width: 180px;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
}

.tech-step:hover {
  border-color: var(--primary-blue);
  transform: scale(1.02);
}

.tech-step-number {
  width: 36px;
  height: 36px;
  background: var(--primary-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: 600;
}

.tech-step h4 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.tech-arrow {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.tech-description {
  max-width: 700px;
  margin: 3rem auto 0;
  text-align: center;
  padding: 24px;
  background: var(--primary-pale);
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
}

/* ============================================
   MEMBERSHIP SECTION
   ============================================ */
.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.membership-card {
  background: var(--bg-white);
  border-radius: 12px;
  border: 2px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.membership-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30, 90, 142, 0.15);
}

.membership-card.featured {
  border-color: var(--primary-blue);
  position: relative;
}

.membership-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: 16px;
  right: -32px;
  background: var(--accent-gold);
  color: white;
  padding: 4px 40px;
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(45deg);
}

.membership-header {
  background: var(--primary-pale);
  padding: 32px;
  text-align: center;
}

.membership-card.featured .membership-header {
  background: var(--primary-blue);
}

.membership-card.featured .membership-header h3,
.membership-card.featured .membership-header .price {
  color: white;
}

.membership-header h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.membership-card.featured .price span {
  color: rgba(255, 255, 255, 0.8);
}

.membership-body {
  padding: 32px;
}

.membership-body ul {
  list-style: none;
  margin-bottom: 2rem;
}

.membership-body li {
  padding: 12px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--bg-light);
}

.membership-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 600;
}

.membership-body li:last-child {
  border-bottom: none;
}

/* Pricing Addon Section */
.pricing-addon {
  margin-top: 4rem;
  padding: 3rem;
  background: var(--bg-white);
  border-radius: 16px;
  border: 2px solid var(--border-light);
  text-align: center;
}

.pricing-addon h3 {
  color: var(--primary-blue);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.pricing-addon>p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.pricing-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pricing-card {
  background: var(--primary-pale);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 24px 32px;
  min-width: 150px;
  position: relative;
  transition: all var(--transition-smooth);
}

.pricing-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(30, 90, 142, 0.15);
}

.pricing-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1;
}

.pricing-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 4px 0 12px;
}

.pricing-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent-gold);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.pricing-note {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* ============================================
   RESEARCH SECTION
   ============================================ */
.research-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.research-text h3 {
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

.research-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.5rem;
}

.research-tag {
  background: var(--primary-pale);
  color: var(--primary-blue);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
}

.research-image {
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--bg-light) 100%);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
}

.research-image p {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-info {
  margin: 2rem 0;
  padding: 24px;
  background: var(--bg-light);
  border-radius: 8px;
}

.contact-info p {
  margin: 0.5rem 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 48px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
}

.footer h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin: 8px 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {

  .about-grid,
  .services-grid,
  .membership-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .research-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 120px 0 80px;
  }

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

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

  .nav-toggle {
    display: flex;
  }

  .about-grid,
  .services-grid,
  .membership-grid {
    grid-template-columns: 1fr;
  }

  .tech-flow {
    flex-direction: column;
  }

  .tech-arrow {
    transform: rotate(90deg);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

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

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

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

  .btn {
    width: 100%;
    text-align: center;
  }
}