@import url("./style/digital_background.css");
@import url("./style/saveContactsButtonStyle.css");
@import url("./style/darkTheme.css");
@import url("./style/about.css");
@import url("./style/social_link.css");
@import url("./style/hero_section.css");
@import url("./style/yalarba_investmen.css");
@import url("./style/footer.css");
@import url("./style/repository_section.css");
@import url("./style/links_style.css");
@import url("./style/skill_section.css");

/* style.css - обновленный */
:root {
  --primary: #a9e299;
  --secondary: #63c1ff;
  --light: #ecf0f1;
  --dark: #36304d;
  --success: #2ecc71;
  --border-radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  min-width: 300px;
  max-width: 1200px;
  margin: 10px auto 5px auto;
  padding: 10px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* Улучшенная сетка для header */
header {
  background-color: var(--primary);
  color: var(--dark);
  padding: 2rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1rem;
  align-items: center;
  position: relative;
}

.theme-toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  padding: 8px 12px;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  z-index: 1000;
}

.social_links_block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  justify-items: center;
  margin-top: 1rem;
}

/* Улучшенная сетка для секций */
.section {
  background: rgb(226, 240, 241);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.entrepreneur-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.highlight-item {
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

/* Сетка для команды */
.team-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.team-header {
  text-align: center;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.role-card {
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
}

.role-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Сетка для Yalarba секции */
.yalarba-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.yalarba-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  justify-items: center;
}

.yalarba-value ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

/* Сетка для контактов */
.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Сетка для футера */
footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
  padding: 1em 0 0 0;
  color: var(--dark);
  font-size: 0.9rem;
  border-radius: 1rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1em;
}

.footer-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.two-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-left: 1px solid black;
  grid-template-rows: auto; /* Явно указываем одну строку */
  grid-auto-flow: row; /* Запрещаем автоматическое создание новых строк */
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  color: white;
}

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

/* Timeline улучшения */
.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
  padding-left: 30px;
}

.timeline:before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--secondary);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: -30px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--secondary);
}

/* Адаптация для мелких экранов */
@media (max-width: 768px) {
  body {
    padding: 5px 10px;
    margin: 5px auto;
  }

  header {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 1.5rem 1rem;
  }

  .theme-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    margin-bottom: 1rem;
  }

  .section {
    padding: 1.5rem;
  }

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

  .about-valitovgaziz-photo-box img {
    min-width: 100%;
  }

  .about-text {
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .roles-grid {
    grid-template-columns: 1fr;
  }

  .yalarba-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .two-column-grid {
    border-left: none;
    border-top: 1px solid black;
    padding-top: 1rem;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline:before {
    left: 8px;
  }

  .timeline-item:before {
    left: -20px;
  }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  .section {
    padding: 1rem;
  }

  .hero {
    padding: 1.5rem 1rem;
  }

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

  .hero-description {
    font-size: 1rem;
  }

  .projects-grid,
  .roles-grid,
  .entrepreneur-highlights {
    grid-template-columns: 1fr;
  }

  .yalarba-stats {
    grid-template-columns: 1fr;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* Улучшения для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .entrepreneur-highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Анимации и улучшения UX */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeIn 0.5s ease-out;
}

.project-card,
.role-card,
.highlight-item {
  animation: fadeIn 0.5s ease-out;
}

/* Улучшения доступности */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Улучшения фокуса для доступности */
button:focus,
a:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Улучшения для темной темы */
body.dark-mode .highlight-item,
body.dark-mode .role-card {
  background: var(--dark-card);
}

body.dark-mode .project-card:hover,
body.dark-mode .role-card:hover,
body.dark-mode .highlight-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}
