:root {
    --red: #c1272d;
    --red-dark: #a11f24;
    --red-light: #e8353b;
    --accent-blue: #3b82f6;
    --grey-bg: #2a2a2a;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.18);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background: #f5f5f5;
    line-height: 1.6;
}

/* Hero Section */
.hero {
  /* Путь к картинке. Flask автоматически обработает /static/ */
  background-image: url('/static/img/hero.jpg');
  
  /* Дополнительно: затемнение картинки, чтобы белый текст читался */
  background-color: rgba(42, 42, 42, 0.6); 
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  text-align: center;
  color: var(--white);
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image:
        radial-gradient(circle at 20% 80%, var(--red) 80px, transparent 81px),
        radial-gradient(circle at 80% 50%, var(--red) 60px, transparent 61px);
    background-size: 200px 200px, 150px 150px;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Team Grid */
.team-section {
    margin: -60px auto 80px;
    position: relative;
    z-index: 2;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Team Card */
.team-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.team-card__photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.team-card__info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.team-card__position {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.team-card__name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.team-card__department {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.team-card__views {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: auto;
}

/* Navigation */
.back-nav {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.back-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.back-nav a:hover {
    color: var(--red);
}

/* Profile Page */
.profile {
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 40px;
    align-items: start;
}

.profile__sidebar {
    position: sticky;
    top: 20px;
}

.profile__photo {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}

.profile__photo img {
    width: 100%;
    display: block;
}

.profile__contact {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.profile__contact h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--red);
    text-transform: uppercase;
}

.profile__contact p {
    font-size: 14px;
    margin-bottom: 8px;
    word-break: break-word;
}

.profile__views {
    display: inline-block;
    background: #e9ecef;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
}

/* Profile Info */
.profile__info {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}

.profile__department {
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.profile__position {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.profile__name {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 35px;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section:last-child {
    margin-bottom: 0;
}

.section__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section__title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--red);
    border-radius: 2px;
}

.section__title small {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: none;
    font-weight: 400;
}

/* Responsibility List */
.responsibility-list {
    list-style: none;
}

.responsibility-list li {
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s;
}

.responsibility-list li:hover {
    background: #e9ecef;
    transform: translateX(4px);
    border-left-color: var(--red);
}

/* Two Columns Layout */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--grey-bg);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* 404 Page */
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.error-page h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 20px;
}

.error-page p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 39, 45, 0.35);
}