/* ============================================
   BRAINTWIN - Professional Research Website Styles
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #1a5f7a;
  --primary-dark: #134b5f;
  --primary-light: #2e8ab8;
  --secondary-color: #57c5b6;
  --accent-color: #159895;
  --dark-bg: #0a1628;
  --dark-surface: #1a2744;
  --light-bg: #f8fafc;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  --gradient-dark: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-surface) 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
  --transition: all 0.3s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  padding-top: 76px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

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

p { margin-bottom: 1rem; }

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

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

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

/* Navigation */
.navbar {
  background: var(--dark-bg) !important;
  padding: 1rem 0;
  transition: var(--transition);
  box-shadow: none;
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.98) !important;
  box-shadow: var(--shadow-md);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.brand-text {
  background: linear-gradient(135deg, var(--white) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  color: rgba(255,255,255,0.85) !important;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color) !important;
}

.dropdown-menu {
  background: var(--dark-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
}

.dropdown-item {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.1);
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  background: var(--gradient-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-top: -76px;
  padding-top: 76px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/hero-pattern.svg') center/cover;
  opacity: 0.1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, var(--primary-color) 0%, transparent 70%);
  opacity: 0.15;
  transform: translateY(-50%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: rgba(87, 197, 182, 0.15);
  color: var(--secondary-color);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(87, 197, 182, 0.3);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

.hero-image {
  position: relative;
  z-index: 2;
}

.hero-image img {
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
}

/* Buttons */
.btn {
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 95, 122, 0.35);
  background: var(--primary-dark);
}

.btn-outline-light {
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

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

/* Section Styles */
.section {
  padding: 6rem 0;
}

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

.section-dark {
  background: var(--dark-bg);
  color: var(--white);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  margin-top: 1rem;
  border-radius: 2px;
}

.section-title.text-center::after {
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
}

.section-subtitle.text-center {
  margin-left: auto;
  margin-right: auto;
}

.bi-bluesky::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 530'%3E%3Cpath fill='currentColor' d='m135.7 44.3c66.3 49.7 137.7 150.5 164.3 204.5 26.6-54 97.9-154.8 164.3-204.5 47.9-35.8 125.3-63.6 125.3 24.4 0 17.6-10.1 147.6-16 168.7-20.6 73.3-95.8 92-163.8 80.7 118.8 20.2 149 87 83.8 153.8-124.1 127-178.4-31.9-192.2-72.7-2.5-7.4-3.7-10.9-3.7-7.9-.1-3-1.2.5-3.7 7.9-13.8 40.8-68.1 199.7-192.2 72.7-65.2-66.8-35-133.6 83.8-153.8-68-11.3-143.2-7.4-163.8-80.7-5.9-21.1-16-151.1-16-168.7 0-88 77.4-60.2 125.3-24.4z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Cards */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
}

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

.card-body {
  padding: 1.75rem;
}

.card-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Work Package Cards */
.wp-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
}

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

.wp-card-header {
  background: var(--gradient-primary);
  padding: 1.5rem;
  color: var(--white);
}

.wp-number {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.wp-card-header h3 {
  color: var(--white);
  margin: 0;
  font-size: 1.25rem;
}

.wp-card-body {
  padding: 1.5rem;
}

.wp-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.wp-lead {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Team Section */
.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid var(--light-bg);
}

.team-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.team-links{
  display:flex;
  gap:.6rem;
  justify-content:center;
  margin-top:.6rem;
}
.team-links a{
  width:34px;height:34px;
  display:inline-flex;
  align-items:center;justify-content:center;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  color:inherit;
  text-decoration:none;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.team-links a:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  background:rgba(0,0,0,.03);
}
.team-links i{ font-size:1rem; }

.team-role {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.team-institution {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Partner Logos */
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 0.75rem;
  transition: var(--transition);
  height: 100px;
}

.partner-logo:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.partner-logo img {
  max-height: 60px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition);
}

.partner-logo:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* News Cards */
.news-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.news-card:hover {
  box-shadow: var(--shadow-lg);
}

.news-date {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background: var(--dark-bg);
  color: rgba(255,255,255,0.8);
}

.footer-main {
  padding: 4rem 0;
}

.widget-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--secondary-color);
}

.text-light-muted {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

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

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  margin-right: 0.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.funding-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.funding-logo {
  background: rgba(255,255,255,0.1);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
}

.funding-logo:hover {
  background: rgba(255,255,255,0.15);
}

.funding-logo img {
  max-height: 40px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-bottom {
  background: rgba(0,0,0,0.2);
  padding: 1.25rem 0;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: var(--secondary-color);
}

.footer-counter .counter-card{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 12px 14px;
  max-width: 260px;
}
.footer-counter .counter-label{
  display:flex;
  align-items:center;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
}
.footer-counter .counter-value{
  margin-top: 6px;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-5px);
}

/* Page Headers */
.page-header {
  background: var(--gradient-dark);
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/hero-pattern.svg') center/cover;
  opacity: 0.1;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.page-header .breadcrumb {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.page-header .breadcrumb-item a {
  color: rgba(255,255,255,0.7);
}

.page-header .breadcrumb-item.active {
  color: var(--secondary-color);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-color);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-5.5px);
}

/* Utilities */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

/* Responsive */
@media (max-width: 991px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 66px;
  }
  
  .hero {
    min-height: auto;
    padding: 6rem 0;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .page-header {
    padding: 6rem 0 3rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
}

/* Animation Classes */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}
