/* ==========================================
   Сброс стилей и базовые переменные
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a{
	text-decoration: none;
}

:root {
  --color-primary: #D95353;
  --color-primary-hover: #c44343;
  --color-text-main: #2b2b2b;
  --color-text-muted: #8c8c8c;
  --color-bg: #fcfcfc;
  --color-white: #ffffff;
  --color-border: #e0e0e0;
  --font-family: 'Montserrat', sans-serif;
  --transition: all 0.3s ease;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.5;
}

img {
  /* max-width: 100%;
  height: auto;
  display: block; */
}

button, input {
  font-family: inherit;
  outline: none;
}

/* ==========================================
   Шапка (Header)
   ========================================== */
.header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  /* padding: 12px 24px; */
  padding-top: 12px;
  padding-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

.header__logo:hover {
  opacity: 0.8;
}

.header__user {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.header__user-name {
  font-weight: 600;
  font-size: 18px;
  transition: var(--transition);
  color: var(--color-text-main);
}

.header__user:hover .header__user-name {
  color: var(--color-primary);
}

.header__user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: var(--transition);
}

.header__user:hover .header__user-avatar {
  border-color: var(--color-primary);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 50px;
    margin-bottom: 50px;
    /* padding: 50px 20px; */
}

/* Hero Section */
.hero-title-section {
    text-align: center;
    margin-bottom: 45px;
    animation: fadeInUp 0.6s ease forwards;
}

.main-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #000000;
}

.main-subtitle {
    font-size: 16px;
    color: #666666;
    font-weight: 500;
}

.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* .content__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
} */

/* Табы (Tabs) */
.tabs {
  display: flex;
  gap: 32px;
  border-bottom: 2px solid transparent;
}

.tabs__item {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-main);
  text-decoration: none;
  padding-bottom: 8px;
  position: relative;
  transition: var(--transition);
}

.tabs__item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: var(--transition);
}

.tabs__item:hover::after {
  width: 100%;
}

.tabs__item--active {
  color: var(--color-primary);
}

.tabs__item--active::after {
  width: 100%;
}

/* Поиск (Search) */
.search__input {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  width: 260px;
  font-size: 14px;
  transition: var(--transition);
}

.search__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 83, 83, 0.1);
  width: 290px;
}

/* Grid */
.grid-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cards-grid {
    width: 1200px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cards-grid.hidden{
    display: none;
}

/* Карточка (Card) */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  animation: fadeIn 0.5s ease forwards;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  border-color: #ccc;
}

/* Обычная карточка с картой */
.card__image-wrapper {
  background-color: #f2f5f8;
  height: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__map-mockup {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__content {
  padding: 16px;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

@media (max-width: 1200px) {
    .cards-grid {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        grid-template-columns: repeat(3, 1fr);
    }
    .header__container{
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
    .controls-section{
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
    .users_list{
        padding-left: 20px;
        padding-right: 20px;
        width: 100%;
    }
    .task{
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .controls-section{
        column-gap: 0;
        flex-direction: column;
        align-items: center;
        row-gap: 20px;
    }
    .search{
        width: 100%;
    }
    .search__input{
        width: 100%;
    }
    .search__input:focus {
        width: 100%;
    }
    .tabs{
        width: 100%;
        justify-content: space-around;
    }
    .hero-title-section{
        padding-left: 20px;
        padding-right: 20px;
    }
    .main-title{
        font-size: 24px;
    }
}

@media (max-width: 400px){
    .cards-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.users_list{
    /* margin-top: 20px; */
    display: flex;
    flex-direction: column;
    width: 100%;
    row-gap: 10px;
}

.users_list.hidden{
    display: none;
}

.author{
    display: flex;
    align-items: center;
    column-gap: 10px;
}

.author_avatar{
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author_name{
    font-size: 18px;
    color: rgba(0, 0, 0, 0.8);
}

.task{
    box-sizing: border-box;
    padding: 10px;
    padding-left: 20px;
    width: 100%;
    height: auto;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    transition: 0.2s;
    cursor: pointer;

    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    line-height: 25px;
    color: #000000;
}

.task_info{
    display: flex;
    flex-direction: column;
}

.task:hover{
    opacity: 0.7;
}