:root {
  /* Цветовая схема "Тетрада" */
  --primary: #4a6baf;
  --primary-dark: #345293;
  --primary-light: #7c94d0;
  --secondary: #d87e54;
  --secondary-dark: #c56b42;
  --secondary-light: #e9a588;
  --tertiary: #50b67b;
  --tertiary-dark: #3d9d67;
  --tertiary-light: #7fd0a0;
  --quaternary: #b44c99;
  --quaternary-dark: #9a3980;
  --quaternary-light: #d27db8;
  
  /* Нейтральные цвета */
  --dark: #333333;
  --gray-dark: #555555;
  --gray: #888888;
  --gray-light: #cccccc;
  --light: #f8f8f8;
  --white: #ffffff;
  
  /* Системные цвета */
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  
  /* Шрифты */
  --heading-font: 'Playfair Display', serif;
  --body-font: 'Source Sans Pro', sans-serif;
  
  /* Размеры и пространство */
  --section-padding: 5rem 0;
  --card-padding: 1.5rem;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Основные стили */
body {
  font-family: var(--body-font);
  color: var(--dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-title {
  position: relative;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  text-align: center;
  color: var(--dark);
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--gray);
}

.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

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

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

/* Навигация */
header {
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--gray-dark);
  font-weight: 600;
  transition: var(--transition);
  margin: 0 0.5rem;
  position: relative;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--primary);
}

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

.navbar-light .navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Кнопки */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  border: none;
}

.btn:hover, .btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

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

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  color: var(--white);
}

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

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--secondary-dark);
  color: var(--white);
}

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

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

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

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

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  margin-top: 0;
  padding-top: 6rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
  z-index: 1;
}

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

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--white);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-section h1 {
    font-size: 3.5rem;
  }
  
  .hero-section p {
    font-size: 1.4rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
}

/* Services Section */
#servicios .card {
  height: 100%;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#servicios .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#servicios .card-image {
  overflow: hidden;
  width: 100%;
  height: 250px;
}

#servicios .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

#servicios .card:hover .card-img-top {
  transform: scale(1.05);
}

#servicios .card-body {
  padding: var(--card-padding);
  background-color: var(--white);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#servicios .card-title {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#servicios .card-text {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

#servicios .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* About Us Section */
#nosotros {
  position: relative;
}

#nosotros img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

#nosotros img:hover {
  transform: scale(1.02);
}

#nosotros h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

#nosotros p {
  margin-bottom: 1rem;
}

/* Projects Section */
#proyectos .card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

#proyectos .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#proyectos .card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

#proyectos .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

#proyectos .card:hover .card-img-top {
  transform: scale(1.05);
}

#proyectos .card-body {
  padding: var(--card-padding);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#proyectos .card-title {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#proyectos .card-text {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

#proyectos .badge {
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
}

/* History Section */
#historia .timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
  border-left: 3px solid var(--primary);
  padding-bottom: 1rem;
}

#historia .timeline-year {
  position: absolute;
  left: -20px;
  top: 0;
  background-color: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--box-shadow);
}

#historia .timeline-content {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

#historia .timeline-content h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Research Section */
#investigacion {
  position: relative;
}

#investigacion img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

#investigacion img:hover {
  transform: scale(1.02);
}

#investigacion h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

#investigacion .research-stats {
  display: flex;
  flex-wrap: wrap;
}

#investigacion .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background-color: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

#investigacion .stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#investigacion .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-family: var(--heading-font);
}

#investigacion .stat-label {
  font-size: 0.9rem;
  color: var(--gray);
  text-align: center;
}

/* Success Stories Section */
#historias-exito .card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

#historias-exito .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#historias-exito .card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

#historias-exito .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

#historias-exito .card:hover .card-img-top {
  transform: scale(1.05);
}

#historias-exito .card-body {
  padding: var(--card-padding);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#historias-exito .card-title {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#historias-exito .testimonial {
  background-color: var(--light);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--secondary);
}

#historias-exito .testimonial-text {
  margin-bottom: 0.5rem;
}

#historias-exito .testimonial-author {
  font-weight: 700;
  color: var(--gray-dark);
  text-align: right;
  margin-bottom: 0;
}

/* External Resources */
#recursos .resource-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  height: 100%;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

#recursos .resource-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#recursos .resource-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

#recursos .resource-card p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

#recursos .resource-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Blog Section */
#blog .card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

#blog .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#blog .card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

#blog .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

#blog .card:hover .card-img-top {
  transform: scale(1.05);
}

#blog .card-body {
  padding: var(--card-padding);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#blog .card-title {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#blog .card-text {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

#blog .text-muted {
  font-size: 0.9rem;
  font-style: italic;
}

#blog .btn-outline-primary {
  align-self: flex-end;
}

/* Vision Section */
.vision-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--white);
  padding: 5rem 0;
}

.vision-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
  z-index: 1;
}

.vision-section .container {
  position: relative;
  z-index: 2;
}

.vision-section .section-title {
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.vision-section p {
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Contact Section */
#contacto .contact-info {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: 100%;
}

#contacto .contact-info h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

#contacto .contact-info ul li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

#contacto .contact-info ul li i {
  margin-right: 1rem;
  color: var(--primary);
}

#contacto .social-media h4 {
  margin-bottom: 1rem;
}

#contacto .social-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

#contacto .social-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

#contacto .contact-form {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: 100%;
}

#contacto .contact-form h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

#contacto .form-control {
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

#contacto .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 107, 175, 0.25);
}

#contacto .form-label {
  color: var(--gray-dark);
  font-weight: 600;
}

/* Media Section */
#medios .media-logo {
  max-width: 150px;
  height: auto;
  opacity: 0.7;
  transition: var(--transition);
  filter: grayscale(100%);
}

#medios .media-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

#medios .media-mention {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  height: 100%;
  transition: var(--transition);
}

#medios .media-mention:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#medios .media-mention h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

#medios .media-mention small {
  display: block;
  margin-top: 1rem;
  font-style: italic;
  color: var(--gray);
}

/* Footer */
footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

footer h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

footer p {
  color: var(--gray-light);
}

footer .footer-links {
  margin-bottom: 2rem;
}

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

footer .footer-links a {
  color: var(--gray-light);
  text-decoration: none;
  transition: var(--transition);
}

footer .footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

footer ul li {
  color: var(--gray-light);
}

footer ul li i {
  margin-right: 0.5rem;
  color: var(--primary-light);
}

footer .social-links {
  margin-top: 1rem;
}

footer .social-links a {
  color: var(--gray-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

footer .social-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

footer hr {
  border-color: var(--gray-dark);
  margin: 2rem 0;
}

footer .list-inline-item:not(:last-child) {
  margin-right: 1.5rem;
}

footer .list-inline-item a {
  color: var(--gray-light);
  text-decoration: none;
  transition: var(--transition);
}

footer .list-inline-item a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Cookie Consent */
#cookieConsent {
  background-color: rgba(0, 0, 0, 0.9);
  color: var(--white);
  padding: 1.5rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#cookieConsent p {
  margin-bottom: 1rem;
  text-align: center;
  max-width: 800px;
}

#acceptCookies {
  background-color: var(--tertiary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

#acceptCookies:hover {
  background-color: var(--tertiary-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Success Page */
.success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.success-page h1 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.success-page p {
  max-width: 600px;
  margin-bottom: 2rem;
}

.success-icon {
  font-size: 5rem;
  color: var(--tertiary);
  margin-bottom: 2rem;
}

/* Privacy & Terms Pages */
.content-page {
  padding-top: 100px;
  padding-bottom: 3rem;
}

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

.content-page h2 {
  color: var(--secondary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-page p {
  margin-bottom: 1rem;
}

.content-page ul {
  margin-bottom: 1.5rem;
}

/* Адаптивные стили */
@media (max-width: 767px) {
  .hero-section {
    padding-top: 4rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  #historia .timeline-item {
    padding-left: 2rem;
  }
  
  #historia .timeline-year {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    left: -15px;
  }
  
  #contacto .contact-info,
  #contacto .contact-form {
    margin-bottom: 2rem;
  }
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

[data-aos="custom-fade-up"] {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.5s, opacity 0.5s;
}

[data-aos="custom-fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Изображения с текстом */
.text-on-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.text-on-image img {
  width: 100%;
  height: auto;
  transition: var(--transition);
}

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

.text-on-image .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
  color: var(--white);
}

.text-on-image .overlay h3 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

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

.read-more::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition);
}

.read-more:hover {
  color: var(--primary-dark);
  padding-right: 2rem;
}

.read-more:hover::after {
  right: 0.5rem;
}

/* Карточки с равной высотой */
.equal-height-cards {
  display: flex;
  flex-wrap: wrap;
}

.equal-height-cards .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.equal-height-cards .card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.equal-height-cards .card-text {
  flex-grow: 1;
}

/* Общие стили для карточек */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-image {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
}

.card-content, .card-body {
  width: 100%;
  text-align: center;
}

body {
  overflow-x: hidden;
}

@media (max-width:768px){
    .testimonial-card {
      flex-direction: column;
    }
    .testimonial-content {
      padding: 20px;
    }
    .testimonial-image {
      width: 120px;
      margin-left: auto;
      margin-right: auto;
    }
}