:root {
  /* Триадная цветовая схема */
  --primary-color: #6200ea;
  --secondary-color: #00c853;
  --tertiary-color: #ff5722;
  
  /* Оттенки основных цветов */
  --primary-dark: #4b00b5;
  --primary-light: #985fff;
  --secondary-dark: #009624;
  --secondary-light: #5efc82;
  --tertiary-dark: #c41c00;
  --tertiary-light: #ff8a50;
  
  /* Нейтральные цвета */
  --dark: #212121;
  --dark-gray: #424242;
  --medium-gray: #757575;
  --light-gray: #e0e0e0;
  --off-white: #f5f5f5;
  --white: #ffffff;
  
  /* Тени для неоморфизма */
  --nm-light-shadow: rgba(255, 255, 255, 0.7);
  --nm-dark-shadow: rgba(0, 0, 0, 0.15);
  
  /* Размеры и отступы */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
  
  /* Скругления */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  
  /* Переходы */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Основные стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  direction: rtl;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Nunito', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--off-white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cairo', 'Oswald', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--dark);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-lg);
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: var(--border-radius-sm);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--space-md);
}

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

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius-md);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-xl) 0;
  position: relative;
}

/* Неоморфные карточки */
.card {
  background: var(--off-white);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: transform var(--transition-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 
    12px 12px 20px var(--nm-dark-shadow),
    -12px -12px 20px var(--nm-light-shadow);
}

.card-image {
  width: 100%;
  height: 250px;
  margin-bottom: var(--space-md);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 
    inset 4px 4px 8px var(--nm-dark-shadow),
    inset -4px -4px 8px var(--nm-light-shadow);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  text-align: center;
  padding: var(--space-md);
  width: 100%;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  text-align: center;
  box-shadow: 
    4px 4px 8px var(--nm-dark-shadow),
    -4px -4px 8px var(--nm-light-shadow);
  text-decoration: none;
  margin: var(--space-sm);
}

.btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 
    6px 6px 12px var(--nm-dark-shadow),
    -6px -6px 12px var(--nm-light-shadow);
}

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

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

.btn-secondary {
  background: var(--secondary-color);
}

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

button, input[type="submit"] {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  text-align: center;
  box-shadow: 
    4px 4px 8px var(--nm-dark-shadow),
    -4px -4px 8px var(--nm-light-shadow);
}

button:hover, input[type="submit"]:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 
    6px 6px 12px var(--nm-dark-shadow),
    -6px -6px 12px var(--nm-light-shadow);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--off-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: var(--space-md) 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: block;
}

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

.main-nav ul {
  display: flex;
  gap: var(--space-md);
}

.main-nav a {
  color: var(--dark);
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-medium);
}

.main-nav a:hover {
  color: var(--primary-color);
  background: rgba(98, 0, 234, 0.05);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark);
  border-radius: 3px;
  transition: all var(--transition-medium);
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  color: var(--white);
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: var(--space-lg);
  color: var(--white);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* About Section */
.about-section {
  background-color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header p {
  color: var(--medium-gray);
  font-size: 1.1rem;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  align-items: center;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.image-container {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

/* Services Section */
.services-section {
  background-color: var(--off-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Process Section */
.process-section {
  background-color: var(--white);
}

.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.step {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto var(--space-md);
  box-shadow: 
    4px 4px 8px var(--nm-dark-shadow),
    -4px -4px 8px var(--nm-light-shadow);
}

.process-image {
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

/* Team Section */
.team-section {
  background-color: var(--off-white);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* History Section */
.history-section {
  background-color: var(--white);
}

.history-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  align-items: center;
}

.history-image {
  flex: 1;
  min-width: 300px;
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.history-timeline {
  flex: 1;
  min-width: 300px;
}

.timeline-item {
  display: flex;
  margin-bottom: var(--space-lg);
}

.year {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 80px;
}

.description {
  padding-right: var(--space-lg);
  position: relative;
}

.description::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 
    2px 2px 4px var(--nm-dark-shadow),
    -2px -2px 4px var(--nm-light-shadow);
}

.description::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 6px;
  width: 2px;
  height: calc(100% + 20px);
  background: var(--primary-light);
}

.timeline-item:last-child .description::after {
  display: none;
}

/* Research Section */
.research-section {
  background-color: var(--off-white);
}

.research-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  align-items: center;
}

.research-text {
  flex: 1;
  min-width: 300px;
}

.research-image {
  flex: 1;
  min-width: 300px;
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

/* Resources Section */
.resources-section {
  background-color: var(--white);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.resource-card {
  background: var(--off-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
  transition: transform var(--transition-medium);
  text-align: center;
}

.resource-card:hover {
  transform: translateY(-5px);
}

.resource-card a {
  display: inline-block;
  margin-top: var(--space-md);
  color: var(--primary-color);
  font-weight: bold;
  transition: color var(--transition-fast);
}

.resource-card a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Insights Section */
.insights-section {
  background-color: var(--off-white);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Behind the Scenes Section */
.behind-scenes-section {
  background-color: var(--white);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: var(--white);
  transition: opacity var(--transition-medium);
}

.gallery-caption h3 {
  color: var(--white);
  margin-bottom: var(--space-sm);
}

/* Contact Section */
.contact-section {
  background-color: var(--off-white);
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.info-item {
  margin-bottom: var(--space-lg);
}

.info-item h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-sm);
}

.map {
  margin-top: var(--space-lg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
}

.contact-form {
  flex: 1;
  min-width: 300px;
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border: none;
  background: var(--off-white);
  border-radius: var(--border-radius-md);
  box-shadow: 
    inset 2px 2px 5px var(--nm-dark-shadow),
    inset -2px -2px 5px var(--nm-light-shadow);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 
    inset 4px 4px 8px var(--nm-dark-shadow),
    inset -4px -4px 8px var(--nm-light-shadow);
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-logo {
  flex: 1;
  min-width: 200px;
}

.footer-logo img {
  margin-bottom: var(--space-md);
}

.footer-links,
.footer-social,
.footer-contact {
  flex: 1;
  min-width: 200px;
}

.footer h3 {
  color: var(--white);
  margin-bottom: var(--space-md);
  position: relative;
  padding-bottom: var(--space-sm);
}

.footer h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background: var(--primary-color);
}

.footer ul {
  margin-bottom: var(--space-md);
}

.footer ul li {
  margin-bottom: var(--space-sm);
}

.footer a {
  color: var(--light-gray);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Success Page */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) 0;
}

.success-content {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
  max-width: 600px;
}

.success-icon {
  font-size: 4rem;
  color: var(--secondary-color);
  margin-bottom: var(--space-lg);
}

/* Privacy & Terms Pages */
.page-content {
  padding-top: 120px;
  min-height: 100vh;
}

.page-content .container {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    8px 8px 16px var(--nm-dark-shadow),
    -8px -8px 16px var(--nm-light-shadow);
}

.page-content h1 {
  margin-bottom: var(--space-lg);
  color: var(--primary-color);
}

.page-content h2 {
  color: var(--primary-dark);
  margin-top: var(--space-lg);
}

/* Responsive styles */
@media (max-width: 992px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero {
    padding: 150px 0 80px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .hero {
    padding: 120px 0 60px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--off-white);
    padding: var(--space-md);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .footer-content {
    gap: var(--space-lg);
  }
  
  .footer-logo,
  .footer-links,
  .footer-social,
  .footer-contact {
    flex: 100%;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero {
    padding: 100px 0 50px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .about-content,
  .research-content,
  .history-content,
  .contact-content {
    gap: var(--space-lg);
  }
  
  .step {
    flex: 100%;
  }
  
  .gallery-item {
    margin-bottom: var(--space-md);
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scale-in.active {
  opacity: 1;
  transform: scale(1);
}

.slide-left {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide-left.active {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Морфинг анимации */
@keyframes morphing {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

.morph-shape {
  animation: morphing 8s ease-in-out infinite;
}

.card-image img, 
.about-image img,
.research-image img,
.history-image img,
.team-grid .card-image img {
  transition: all 0.5s ease;
}

.card:hover .card-image img, 
.about-image:hover img,
.research-image:hover img,
.history-image:hover img {
  transform: scale(1.05);
}

/* Параллакс эффект */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Стили для ссылок "Читать далее" */
.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-sm) 0;
  position: relative;
  transition: all var(--transition-medium);
}

.read-more::after {
  content: '→';
  margin-right: 5px;
  transition: transform var(--transition-medium);
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* Стили для cookie уведомления */
#cookie-consent {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--dark);
  color: var(--white);
  padding: var(--space-lg);
  text-align: center;
  z-index: 9999;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
}

#cookie-consent p {
  margin-bottom: var(--space-md);
}

#accept-cookies {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: background-color var(--transition-fast);
}

#accept-cookies:hover {
  background-color: var(--secondary-dark);
}